Skip to content

Commit

Permalink
docs: registerFormat/setFormat/setModule will be removed in 0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
ctalkington committed May 30, 2015
1 parent 75568f8 commit 2aae944
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ You can also use `npm install https://github.com/archiverjs/node-archiver/archiv

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

#### registerFormat(format, module)

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.

### Instance Methods

Inherits [Transform Stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) methods.
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ vending.registerFormat = function(format, module) {
}

formats[format] = module;
}
};

vending.registerFormat('zip', require('./lib/plugins/zip'));
vending.registerFormat('tar', require('./lib/plugins/tar'));
Expand Down
2 changes: 2 additions & 0 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ Archiver.prototype.finalize = function() {
return this;
};

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

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

0 comments on commit 2aae944

Please sign in to comment.