From 3fc0829511f06f35fde359efcf3193ad0262cffd Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sun, 25 Apr 2021 14:26:36 +0200 Subject: [PATCH] Replace xtend with Object.assign (Level/community#98) --- level-ws.js | 5 ++--- package.json | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/level-ws.js b/level-ws.js index c139f0d..e72444d 100644 --- a/level-ws.js +++ b/level-ws.js @@ -2,7 +2,6 @@ const Writable = require('readable-stream').Writable const inherits = require('inherits') -const extend = require('xtend') const defaultOptions = { type: 'put' } @@ -11,7 +10,7 @@ function WriteStream (db, options) { return new WriteStream(db, options) } - options = extend(defaultOptions, options) + options = Object.assign({}, defaultOptions, options) Writable.call(this, { objectMode: true, @@ -45,7 +44,7 @@ WriteStream.prototype._write = function (data, enc, next) { this._write(data, enc, next) }) } else { - this._buffer.push(extend({ type: this._options.type }, data)) + this._buffer.push(Object.assign({ type: this._options.type }, data)) next() } } diff --git a/package.json b/package.json index 7d5a9cc..707afed 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,7 @@ ], "dependencies": { "inherits": "^2.0.3", - "readable-stream": "^3.1.0", - "xtend": "^4.0.1" + "readable-stream": "^3.1.0" }, "devDependencies": { "dependency-check": "^3.3.0",