Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
[fix] remove copy as it requires write-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrugzz authored and ralphtheninja committed Mar 10, 2015
1 parent 616da29 commit fb73bde
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/levelup.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ function utilStatic (name) {
}

module.exports = LevelUP
module.exports.copy = util.copy
// DEPRECATED: prefer accessing LevelDOWN for this: require('leveldown').destroy()
module.exports.destroy = utilStatic('destroy')
// DEPRECATED: prefer accessing LevelDOWN for this: require('leveldown').repair()
Expand Down
8 changes: 0 additions & 8 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ var extend = require('xtend')
return eo
}())

function copy (srcdb, dstdb, callback) {
srcdb.readStream()
.pipe(dstdb.writeStream())
.on('close', callback ? callback : function () {})
.on('error', callback ? callback : function (err) { throw err })
}

function getOptions (levelup, options) {
var s = typeof options == 'string' // just an encoding
if (!s && options && options.encoding && !options.valueEncoding)
Expand Down Expand Up @@ -84,7 +77,6 @@ function isDefined (v) {

module.exports = {
defaultOptions : defaultOptions
, copy : copy
, getOptions : getOptions
, getLevelDOWN : getLevelDOWN
, dispatchError : dispatchError
Expand Down

1 comment on commit fb73bde

@juliangruber
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Please sign in to comment.