aboutsummaryrefslogtreecommitdiff
path: root/node_modules/clone
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/clone
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
downloadwallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz
update packages
Diffstat (limited to 'node_modules/clone')
-rw-r--r--node_modules/clone/clone.js8
-rw-r--r--node_modules/clone/package.json2
2 files changed, 8 insertions, 2 deletions
diff --git a/node_modules/clone/clone.js b/node_modules/clone/clone.js
index 626375920..ba200c2f9 100644
--- a/node_modules/clone/clone.js
+++ b/node_modules/clone/clone.js
@@ -63,7 +63,13 @@ function clone(parent, circular, depth, prototype) {
} else if (clone.__isDate(parent)) {
child = new Date(parent.getTime());
} else if (useBuffer && Buffer.isBuffer(parent)) {
- child = new Buffer(parent.length);
+ if (Buffer.allocUnsafe) {
+ // Node.js >= 4.5.0
+ child = Buffer.allocUnsafe(parent.length);
+ } else {
+ // Older Node.js versions
+ child = new Buffer(parent.length);
+ }
parent.copy(child);
return child;
} else {
diff --git a/node_modules/clone/package.json b/node_modules/clone/package.json
index 687fa645e..3ddd242f4 100644
--- a/node_modules/clone/package.json
+++ b/node_modules/clone/package.json
@@ -8,7 +8,7 @@
"function",
"date"
],
- "version": "1.0.3",
+ "version": "1.0.4",
"repository": {
"type": "git",
"url": "git://github.com/pvorb/node-clone.git"