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

fclone

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

fclone - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

dist/fclone.js

@@ -24,3 +24,3 @@ (function (root, factory) {

if (Buffer !== undefined && Buffer.isBuffer(obj)) {
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(obj)) {
return new Buffer(obj);

@@ -27,0 +27,0 @@ }

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

!function(e,n){"function"==typeof define&&define.amd?define("fclone",[],n):"object"==typeof module&&module.exports?module.exports=n():e.fclone=n()}(this,function(){"use strict";function e(t,r){if(!t||"object"!==("undefined"==typeof t?"undefined":n(t)))return t;if(t instanceof Date)return new Date(t);if(void 0!==Buffer&&Buffer.isBuffer(t))return new Buffer(t);if(r||(r=[]),Array.isArray(t)){r[r.length]=t;for(var f=t.length,o=-1,i=[];f>++o;)i[o]=~r.indexOf(t[o])?"[Circular]":e(t[o],r);return r.length&&r.length--,i}r[r.length]=t;var u={};t instanceof Error&&(u.name=t.name,u.message=t.message,u.stack=t.stack);for(var c=Object.keys(t),a=c.length;a--;){var l=c[a];u[l]=~r.indexOf(t[l])?"[Circular]":e(t[l],r)}return r.length&&r.length--,u}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};return e});
!function(e,n){"function"==typeof define&&define.amd?define("fclone",[],n):"object"==typeof module&&module.exports?module.exports=n():e.fclone=n()}(this,function(){"use strict";function e(t,r){if(!t||"object"!==("undefined"==typeof t?"undefined":n(t)))return t;if(t instanceof Date)return new Date(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return new Buffer(t);if(r||(r=[]),Array.isArray(t)){r[r.length]=t;for(var f=t.length,o=-1,u=[];f>++o;)u[o]=~r.indexOf(t[o])?"[Circular]":e(t[o],r);return r.length&&r.length--,u}r[r.length]=t;var i={};t instanceof Error&&(i.name=t.name,i.message=t.message,i.stack=t.stack);for(var c=Object.keys(t),a=c.length;a--;){var l=c[a];i[l]=~r.indexOf(t[l])?"[Circular]":e(t[l],r)}return r.length&&r.length--,i}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};return e});
{
"name": "fclone",
"version": "1.0.5",
"version": "1.0.6",
"description": "Clone objects recursively by dropping circular references",

@@ -5,0 +5,0 @@ "main": "dist/fclone.js",

@@ -26,3 +26,5 @@ # FClone

let a = {b: a, c: 'hello'}
let a = {c: 'hello'}
a.b = a
let o = fclone(a)

@@ -29,0 +31,0 @@

@@ -10,3 +10,3 @@ 'use strict';

if (Buffer !== undefined && Buffer.isBuffer(obj)) {
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(obj)) {
return new Buffer(obj);

@@ -13,0 +13,0 @@ }

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