Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deepcopy

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepcopy - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

8

build/deepcopy.js

@@ -357,4 +357,4 @@ /*!

index = undefined,
resultCopy = undefined,
result = undefined,
resultCopy = undefined,
ref = undefined;

@@ -371,4 +371,6 @@

visited.push(value);
reference.push(result);
if (value !== null && /^(?:function|object)$/.test(typeof value)) {
visited.push(value);
reference.push(result);
}
} else {

@@ -375,0 +377,0 @@ // circular reference

@@ -6,2 +6,2 @@ /*!

*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.deepcopy=t():e.deepcopy=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";e.exports=r(3)},function(e,t){"use strict";function r(e,t){if("[object Array]"!==n.call(e))throw new TypeError("array must be an Array");var r=void 0,o=void 0,u=void 0;for(r=0,o=e.length;o>r;++r)if(u=e[r],u===t||u!==u&&t!==t)return r;return-1}t.__esModule=!0;var n=Object.prototype.toString,o="undefined"!=typeof Buffer?function(e){return Buffer.isBuffer(e)}:function(){return!1},u=Object.keys?function(e){return Object.keys(e)}:function(e){var t=typeof e;if(null===e||"function"!==t||"object"!==t)throw new TypeError("obj must be an Object");var r=[],n=void 0;for(n in e)e.hasOwnProperty(n)&&r.push(n);return r},i="function"==typeof Symbol?function(e){return Object.getOwnPropertySymbols(e)}:function(){return[]};t["default"]={getKeys:u,getSymbols:i,indexOf:r,isBuffer:o},e.exports=t["default"]},function(e,t,r){"use strict";function n(e,t){var r=u(e);return null!==r?u(e):o(e,t)}function o(e,t){if("function"!=typeof t)throw new TypeError("customizer is must be a Function");if("function"==typeof e){var r=String(e);return/^\s*function\s*\S*\([^\)]*\)\s*{\s*\[native code\]\s*}/.test(r)?e:new Function("return "+r)()}var n=f.call(e);if("[object Array]"===n)return[];if("[object Object]"===n&&e.constructor===Object)return{};if("[object Date]"===n)return new Date(+e);if("[object RegExp]"===n){var o=String(e),u=o.lastIndexOf("/");return new RegExp(o.slice(1,u),o.slice(u+1))}if(i.isBuffer(e)){var c=new Buffer(e.length);return e.copy(c),c}var l=t(e);return void 0!==l?l:null}function u(e){var t=typeof e;return null!==e&&"object"!==t&&"function"!==t?e:null}t.__esModule=!0;var i=r(1),f=Object.prototype.toString;t["default"]={copy:n,copyCollection:o,copyValue:u},e.exports=t["default"]},function(e,t,r){"use strict";function n(e){}function o(e){var t=arguments.length<=1||void 0===arguments[1]?n:arguments[1];if(null===e)return null;var r=i.copyValue(e);if(null!==r)return r;var o=i.copyCollection(e,t),f=null!==o?o:e,c=[e],l=[f];return u(e,t,f,c,l)}function u(e,t,r,n,o){if(null===e)return null;var c=i.copyValue(e);if(null!==c)return c;var l=f.getKeys(e).concat(f.getSymbols(e)),s=void 0,a=void 0,p=void 0,d=void 0,y=void 0,v=void 0,b=void 0,j=void 0;for(s=0,a=l.length;a>s;++s)p=l[s],d=e[p],y=f.indexOf(n,d),-1===y?(b=i.copy(d,t),v=null!==b?b:d,n.push(d),o.push(v)):j=o[y],r[p]=j||u(d,t,v,n,o);return r}t.__esModule=!0;var i=r(2),f=r(1);t["default"]=o,e.exports=t["default"]}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.deepcopy=t():e.deepcopy=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";e.exports=n(3)},function(e,t){"use strict";function n(e,t){if("[object Array]"!==r.call(e))throw new TypeError("array must be an Array");var n=void 0,o=void 0,u=void 0;for(n=0,o=e.length;o>n;++n)if(u=e[n],u===t||u!==u&&t!==t)return n;return-1}t.__esModule=!0;var r=Object.prototype.toString,o="undefined"!=typeof Buffer?function(e){return Buffer.isBuffer(e)}:function(){return!1},u=Object.keys?function(e){return Object.keys(e)}:function(e){var t=typeof e;if(null===e||"function"!==t||"object"!==t)throw new TypeError("obj must be an Object");var n=[],r=void 0;for(r in e)e.hasOwnProperty(r)&&n.push(r);return n},i="function"==typeof Symbol?function(e){return Object.getOwnPropertySymbols(e)}:function(){return[]};t["default"]={getKeys:u,getSymbols:i,indexOf:n,isBuffer:o},e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=u(e);return null!==n?u(e):o(e,t)}function o(e,t){if("function"!=typeof t)throw new TypeError("customizer is must be a Function");if("function"==typeof e){var n=String(e);return/^\s*function\s*\S*\([^\)]*\)\s*{\s*\[native code\]\s*}/.test(n)?e:new Function("return "+n)()}var r=f.call(e);if("[object Array]"===r)return[];if("[object Object]"===r&&e.constructor===Object)return{};if("[object Date]"===r)return new Date(+e);if("[object RegExp]"===r){var o=String(e),u=o.lastIndexOf("/");return new RegExp(o.slice(1,u),o.slice(u+1))}if(i.isBuffer(e)){var c=new Buffer(e.length);return e.copy(c),c}var l=t(e);return void 0!==l?l:null}function u(e){var t=typeof e;return null!==e&&"object"!==t&&"function"!==t?e:null}t.__esModule=!0;var i=n(1),f=Object.prototype.toString;t["default"]={copy:r,copyCollection:o,copyValue:u},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){}function o(e){var t=arguments.length<=1||void 0===arguments[1]?r:arguments[1];if(null===e)return null;var n=i.copyValue(e);if(null!==n)return n;var o=i.copyCollection(e,t),f=null!==o?o:e,c=[e],l=[f];return u(e,t,f,c,l)}function u(e,t,n,r,o){if(null===e)return null;var c=i.copyValue(e);if(null!==c)return c;var l=f.getKeys(e).concat(f.getSymbols(e)),s=void 0,a=void 0,p=void 0,d=void 0,y=void 0,v=void 0,b=void 0,j=void 0;for(s=0,a=l.length;a>s;++s)p=l[s],d=e[p],y=f.indexOf(r,d),-1===y?(v=i.copy(d,t),b=null!==v?v:d,null!==d&&/^(?:function|object)$/.test(typeof d)&&(r.push(d),o.push(b))):j=o[y],n[p]=j||u(d,t,b,r,o);return n}t.__esModule=!0;var i=n(2),f=n(1);t["default"]=o,e.exports=t["default"]}])});

@@ -0,1 +1,5 @@

# 0.6.1 / 2016-01-13
- fixed #9
# 0.6.0 / 2015-12-29

@@ -2,0 +6,0 @@

@@ -59,4 +59,4 @@ 'use strict';

index = undefined,
resultCopy = undefined,
result = undefined,
resultCopy = undefined,
ref = undefined;

@@ -73,4 +73,6 @@

visited.push(value);
reference.push(result);
if (value !== null && /^(?:function|object)$/.test(typeof value)) {
visited.push(value);
reference.push(result);
}
} else {

@@ -77,0 +79,0 @@ // circular reference

{
"name": "deepcopy",
"version": "0.6.0",
"version": "0.6.1",
"author": "sasa+1 <sasaplus1@gmail.com>",

@@ -54,7 +54,3 @@ "contributors": [

"webpack": "^1.12.9"
},
"engines": {
"node": "^4.2.3",
"npm": "^2.14.7"
}
}

@@ -48,3 +48,3 @@ import { copy, copyCollection, copyValue } from './copy';

let key, value, index, result, resultCopy, ref;
let key, value, index, resultCopy, result, ref;

@@ -60,4 +60,6 @@ for (i = 0, len = keys.length; i < len; ++i) {

visited.push(value);
reference.push(result);
if (value !== null && /^(?:function|object)$/.test(typeof value)) {
visited.push(value);
reference.push(result);
}
} else {

@@ -64,0 +66,0 @@ // circular reference

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc