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

nanoclone

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanoclone - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

rollup.config.js

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"
}
}
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