Skip to content

Commit 2aae944

Browse files
committedMay 30, 2015
docs: registerFormat/setFormat/setModule will be removed in 0.15
1 parent 75568f8 commit 2aae944

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed
 

‎README.md

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ You can also use `npm install https://github.com/archiverjs/node-archiver/archiv
1818

1919
Creates an Archiver instance based on the format (zip, tar, etc) passed. Parameters can be passed directly to `Archiver` constructor for convenience.
2020

21-
#### registerFormat(format, module)
22-
23-
Registers an archive format. Format modules are essentially transform streams with a few required methods. They will be further documented once a formal spec is in place.
24-
2521
### Instance Methods
2622

2723
Inherits [Transform Stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) methods.

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ vending.registerFormat = function(format, module) {
4040
}
4141

4242
formats[format] = module;
43-
}
43+
};
4444

4545
vending.registerFormat('zip', require('./lib/plugins/zip'));
4646
vending.registerFormat('tar', require('./lib/plugins/tar'));

‎lib/core.js

+2
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ Archiver.prototype.finalize = function() {
476476
return this;
477477
};
478478

479+
// needs to be deprecated
479480
Archiver.prototype.setFormat = function(format) {
480481
if (this._format) {
481482
this.emit('error', new Error('format: archive format already set'));
@@ -487,6 +488,7 @@ Archiver.prototype.setFormat = function(format) {
487488
return this;
488489
};
489490

491+
// needs to be deprecated
490492
Archiver.prototype.setModule = function(module) {
491493
if (this._state.aborted) {
492494
this.emit('error', new Error('module: archive was aborted'));

0 commit comments

Comments
 (0)