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.8 to 1.0.9

15

dist/fclone.js

@@ -37,14 +37,5 @@ (function (root, factory) {

// typed array
switch (Object.prototype.toString.call(obj)) {
case '[object Uint8Array]':
case '[object Uint8ClampedArray]':
case '[object Uint16Array]':
case '[object Uint32Array]':
case '[object Int8Array]':
case '[object Int16Array]':
case '[object Int32Array]':
case '[object Float32Array]':
case '[object Float64Array]':
return obj.subarray(0);
// typed array Int32Array etc.
if (/\d[a-z]*Array]$/i.test(Object.prototype.toString.call(obj))) {
return obj.subarray(0);
}

@@ -51,0 +42,0 @@

2

dist/fclone.min.js

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

!function(e,t){"function"==typeof define&&define.amd?define("fclone",[],t):"object"==typeof module&&module.exports?module.exports=t():e.fclone=t()}(this,function(){"use strict";function e(e){if(Array.isArray(e))return!0;var t=e&&e.length;return"number"==typeof t&&(0===t||t-1 in e)&&"function"==typeof e.indexOf}function t(n,o){if(!n||"object"!==("undefined"==typeof n?"undefined":r(n)))return n;if(n instanceof Date)return new Date(n);if("undefined"!=typeof Buffer&&Buffer.isBuffer(n))return new Buffer(n);switch(Object.prototype.toString.call(n)){case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":return n.subarray(0)}if(o||(o=[]),e(n)){o[o.length]=n;for(var f=n.length,a=-1,c=[];f>++a;)c[a]=~o.indexOf(n[a])?"[Circular]":t(n[a],o);return o.length&&o.length--,c}o[o.length]=n;var i={};n instanceof Error&&(i.name=n.name,i.message=n.message,i.stack=n.stack);for(var u=Object.keys(n),y=u.length;y--;){var s=u[y];i[s]=~o.indexOf(n[s])?"[Circular]":t(n[s],o)}return o.length&&o.length--,i}var r="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 t});
!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(e){if(Array.isArray(e))return!0;var n=e&&e.length;return"number"==typeof n&&(0===n||n-1 in e)&&"function"==typeof e.indexOf}function n(r,f){if(!r||"object"!==("undefined"==typeof r?"undefined":t(r)))return r;if(r instanceof Date)return new Date(r);if("undefined"!=typeof Buffer&&Buffer.isBuffer(r))return new Buffer(r);if(/\d[a-z]*Array]$/i.test(Object.prototype.toString.call(r)))return r.subarray(0);if(f||(f=[]),e(r)){f[f.length]=r;for(var o=r.length,i=-1,u=[];o>++i;)u[i]=~f.indexOf(r[i])?"[Circular]":n(r[i],f);return f.length&&f.length--,u}f[f.length]=r;var a={};r instanceof Error&&(a.name=r.name,a.message=r.message,a.stack=r.stack);for(var c=Object.keys(r),l=c.length;l--;){var y=c[l];a[y]=~f.indexOf(r[y])?"[Circular]":n(r[y],f)}return f.length&&f.length--,a}var t="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 n});
{
"name": "fclone",
"version": "1.0.8",
"version": "1.0.9",
"description": "Clone objects by dropping circular references",

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

@@ -22,14 +22,5 @@ 'use strict';

// typed array
switch (Object.prototype.toString.call(obj)) {
case '[object Uint8Array]':
case '[object Uint8ClampedArray]':
case '[object Uint16Array]':
case '[object Uint32Array]':
case '[object Int8Array]':
case '[object Int16Array]':
case '[object Int32Array]':
case '[object Float32Array]':
case '[object Float64Array]':
return obj.subarray(0);
// typed array Int32Array etc.
if (/\d[a-z]*Array]$/i.test(Object.prototype.toString.call(obj))) {
return obj.subarray(0);
}

@@ -36,0 +27,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