Comparing version 0.1.4 to 0.1.5
18
index.js
@@ -0,14 +1,16 @@ | ||
'use strict'; | ||
// ES6 Map | ||
var map | ||
var map; | ||
try { | ||
map = Map | ||
map = Map; | ||
} catch (_) {} | ||
var set | ||
var set; | ||
// ES6 Set | ||
try { | ||
set = Set | ||
set = Set; | ||
} catch (_) {} | ||
module.exports = function clone(src) { | ||
function clone (src) { | ||
// Null/undefined/functions/etc | ||
@@ -51,5 +53,5 @@ if (!src || typeof src !== 'object' || typeof src === 'function') { | ||
if (src instanceof Object) { | ||
var obj = {} | ||
var obj = {}; | ||
for (var key in src) { | ||
obj[key] = clone(src[key]) | ||
obj[key] = clone(src[key]); | ||
} | ||
@@ -62,1 +64,3 @@ return obj | ||
} | ||
module.exports = clone; |
{ | ||
"name": "nanoclone", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "200B to deep clone JavaScript objects", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"module": "src/index.js", | ||
"keywords": [ | ||
@@ -26,5 +27,8 @@ "clone", | ||
"scripts": { | ||
"build": "rollup -c", | ||
"lint": "eslint src/*.js test/*.js", | ||
"pretest": "npm run build", | ||
"test": "jest --coverage && npm run lint", | ||
"size": "size-limit" | ||
"size": "size-limit", | ||
"prepublish": "npm run build" | ||
}, | ||
@@ -40,4 +44,5 @@ "devDependencies": { | ||
"jsdom": "^11.4.0", | ||
"rollup": "^0.53.3", | ||
"size-limit": "^0.13.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4978
8
116
10