@harlem/utilities
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -18,6 +18,8 @@ var __defProp = Object.defineProperty; | ||
// src/clone.ts | ||
// src/get-type.ts | ||
function getType(input) { | ||
return Object.prototype.toString.call(input).slice(8, -1); | ||
return Object.prototype.toString.call(input).slice(8, -1).toLowerCase(); | ||
} | ||
// src/clone.ts | ||
function cloneIdentity(input) { | ||
@@ -58,2 +60,4 @@ return input; | ||
default: () => null, | ||
null: () => null, | ||
undefined: () => null, | ||
boolean: cloneBasic, | ||
@@ -76,3 +80,3 @@ number: cloneBasic, | ||
} | ||
const type = getType(value).toLowerCase(); | ||
const type = getType(value); | ||
const cloner = CLONE_MAP[type] || CLONE_MAP.default; | ||
@@ -79,0 +83,0 @@ return cloner(value); |
// ../build/src/injections/dev.js | ||
var __DEV__ = process.env.NODE_ENV !== "production"; | ||
// src/clone.ts | ||
// src/get-type.ts | ||
function getType(input) { | ||
return Object.prototype.toString.call(input).slice(8, -1); | ||
return Object.prototype.toString.call(input).slice(8, -1).toLowerCase(); | ||
} | ||
// src/clone.ts | ||
function cloneIdentity(input) { | ||
@@ -43,2 +45,4 @@ return input; | ||
default: () => null, | ||
null: () => null, | ||
undefined: () => null, | ||
boolean: cloneBasic, | ||
@@ -61,3 +65,3 @@ number: cloneBasic, | ||
} | ||
const type = getType(value).toLowerCase(); | ||
const type = getType(value); | ||
const cloner = CLONE_MAP[type] || CLONE_MAP.default; | ||
@@ -64,0 +68,0 @@ return cloner(value); |
@@ -15,6 +15,8 @@ var __defProp = Object.defineProperty; | ||
// src/clone.ts | ||
// src/get-type.ts | ||
function getType(input) { | ||
return Object.prototype.toString.call(input).slice(8, -1); | ||
return Object.prototype.toString.call(input).slice(8, -1).toLowerCase(); | ||
} | ||
// src/clone.ts | ||
function cloneIdentity(input) { | ||
@@ -55,2 +57,4 @@ return input; | ||
default: () => null, | ||
null: () => null, | ||
undefined: () => null, | ||
boolean: cloneBasic, | ||
@@ -73,3 +77,3 @@ number: cloneBasic, | ||
} | ||
const type = getType(value).toLowerCase(); | ||
const type = getType(value); | ||
const cloner = CLONE_MAP[type] || CLONE_MAP.default; | ||
@@ -76,0 +80,0 @@ return cloner(value); |
@@ -1,5 +0,7 @@ | ||
// src/clone.ts | ||
// src/get-type.ts | ||
function getType(input) { | ||
return Object.prototype.toString.call(input).slice(8, -1); | ||
return Object.prototype.toString.call(input).slice(8, -1).toLowerCase(); | ||
} | ||
// src/clone.ts | ||
function cloneIdentity(input) { | ||
@@ -40,2 +42,4 @@ return input; | ||
default: () => null, | ||
null: () => null, | ||
undefined: () => null, | ||
boolean: cloneBasic, | ||
@@ -58,3 +62,3 @@ number: cloneBasic, | ||
} | ||
const type = getType(value).toLowerCase(); | ||
const type = getType(value); | ||
const cloner = CLONE_MAP[type] || CLONE_MAP.default; | ||
@@ -61,0 +65,0 @@ return cloner(value); |
@@ -15,6 +15,8 @@ var harlemUtilities = (() => { | ||
// src/clone.ts | ||
// src/get-type.ts | ||
function getType(input) { | ||
return Object.prototype.toString.call(input).slice(8, -1); | ||
return Object.prototype.toString.call(input).slice(8, -1).toLowerCase(); | ||
} | ||
// src/clone.ts | ||
function cloneIdentity(input) { | ||
@@ -55,2 +57,4 @@ return input; | ||
default: () => null, | ||
null: () => null, | ||
undefined: () => null, | ||
boolean: cloneBasic, | ||
@@ -73,3 +77,3 @@ number: cloneBasic, | ||
} | ||
const type = getType(value).toLowerCase(); | ||
const type = getType(value); | ||
const cloner = CLONE_MAP[type] || CLONE_MAP.default; | ||
@@ -76,0 +80,0 @@ return cloner(value); |
@@ -1,2 +0,2 @@ | ||
var c=Object.defineProperty;var l=n=>c(n,"__esModule",{value:!0});var u=(n,t)=>{for(var e in t)c(n,e,{get:t[e],enumerable:!0})};l(exports);u(exports,{clone:()=>o,overwrite:()=>y});function i(n){return Object.prototype.toString.call(n).slice(8,-1)}function p(n){return n}function r(n){return new n.constructor(n)}function s(n){return Object(Symbol.prototype.valueOf.call(n))}function d(n){let t={};for(let e in n)t[e]=o(n[e]);return t}function b(n){return n.map(o)}function m(n){let t=new Set;return n.forEach(e=>{t.add(o(e))}),t}function S(n){let t=new Map;return n.forEach((e,f)=>{t.set(f,o(e))}),t}var a={default:()=>null,boolean:r,number:r,string:r,error:r,date:r,regexp:r,function:p,symbol:s,array:b,object:d,map:S,set:m};function o(n){if(typeof n!="object"||n===null)return n;let t=i(n).toLowerCase();return(a[t]||a.default)(n)}function y(n,t){if(typeof n!="object"||typeof t!="object")return n;let e;for(e in n){if(e in t){n[e]=t[e];continue}delete n[e]}return n} | ||
var a=Object.defineProperty;var l=e=>a(e,"__esModule",{value:!0});var f=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})};l(exports);f(exports,{clone:()=>o,overwrite:()=>p});function y(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(e){return e}function r(e){return new e.constructor(e)}function m(e){return Object(Symbol.prototype.valueOf.call(e))}function d(e){let t={};for(let n in e)t[n]=o(e[n]);return t}function s(e){return e.map(o)}function b(e){let t=new Set;return e.forEach(n=>{t.add(o(n))}),t}function T(e){let t=new Map;return e.forEach((n,u)=>{t.set(u,o(n))}),t}var c={default:()=>null,null:()=>null,undefined:()=>null,boolean:r,number:r,string:r,error:r,date:r,regexp:r,function:i,symbol:m,array:s,object:d,map:T,set:b};function o(e){if(typeof e!="object"||e===null)return e;let t=y(e);return(c[t]||c.default)(e)}function p(e,t){if(typeof e!="object"||typeof t!="object")return e;let n;for(n in e){if(n in t){e[n]=t[n];continue}delete e[n]}return e} | ||
//# sourceMappingURL=harlem-utilities.min.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
function f(n){return Object.prototype.toString.call(n).slice(8,-1)}function l(n){return n}function r(n){return new n.constructor(n)}function u(n){return Object(Symbol.prototype.valueOf.call(n))}function i(n){let t={};for(let e in n)t[e]=o(n[e]);return t}function p(n){return n.map(o)}function s(n){let t=new Set;return n.forEach(e=>{t.add(o(e))}),t}function d(n){let t=new Map;return n.forEach((e,y)=>{t.set(y,o(e))}),t}var c={default:()=>null,boolean:r,number:r,string:r,error:r,date:r,regexp:r,function:l,symbol:u,array:p,object:i,map:d,set:s};function o(n){if(typeof n!="object"||n===null)return n;let t=f(n).toLowerCase();return(c[t]||c.default)(n)}function a(n,t){if(typeof n!="object"||typeof t!="object")return n;let e;for(e in n){if(e in t){n[e]=t[e];continue}delete n[e]}return n}export{o as clone,a as overwrite}; | ||
function y(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function p(e){return e}function o(e){return new e.constructor(e)}function u(e){return Object(Symbol.prototype.valueOf.call(e))}function l(e){let t={};for(let n in e)t[n]=r(e[n]);return t}function f(e){return e.map(r)}function i(e){let t=new Set;return e.forEach(n=>{t.add(r(n))}),t}function m(e){let t=new Map;return e.forEach((n,c)=>{t.set(c,r(n))}),t}var a={default:()=>null,null:()=>null,undefined:()=>null,boolean:o,number:o,string:o,error:o,date:o,regexp:o,function:p,symbol:u,array:f,object:l,map:m,set:i};function r(e){if(typeof e!="object"||e===null)return e;let t=y(e);return(a[t]||a.default)(e)}function d(e,t){if(typeof e!="object"||typeof t!="object")return e;let n;for(n in e){if(n in t){e[n]=t[n];continue}delete e[n]}return e}export{r as clone,d as overwrite}; | ||
//# sourceMappingURL=harlem-utilities.min.esm.js.map |
@@ -1,2 +0,2 @@ | ||
var harlemUtilities=(()=>{var f=Object.defineProperty;var l=(n,t)=>{for(var e in t)f(n,e,{get:t[e],enumerable:!0})};var S={};l(S,{clone:()=>o,overwrite:()=>c});function u(n){return Object.prototype.toString.call(n).slice(8,-1)}function i(n){return n}function r(n){return new n.constructor(n)}function p(n){return Object(Symbol.prototype.valueOf.call(n))}function s(n){let t={};for(let e in n)t[e]=o(n[e]);return t}function d(n){return n.map(o)}function b(n){let t=new Set;return n.forEach(e=>{t.add(o(e))}),t}function m(n){let t=new Map;return n.forEach((e,y)=>{t.set(y,o(e))}),t}var a={default:()=>null,boolean:r,number:r,string:r,error:r,date:r,regexp:r,function:i,symbol:p,array:d,object:s,map:m,set:b};function o(n){if(typeof n!="object"||n===null)return n;let t=u(n).toLowerCase();return(a[t]||a.default)(n)}function c(n,t){if(typeof n!="object"||typeof t!="object")return n;let e;for(e in n){if(e in t){n[e]=t[e];continue}delete n[e]}return n}return S;})(); | ||
var harlemUtilities=(()=>{var u=Object.defineProperty;var l=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})};var T={};l(T,{clone:()=>o,overwrite:()=>c});function y(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function f(e){return e}function r(e){return new e.constructor(e)}function i(e){return Object(Symbol.prototype.valueOf.call(e))}function m(e){let t={};for(let n in e)t[n]=o(e[n]);return t}function d(e){return e.map(o)}function s(e){let t=new Set;return e.forEach(n=>{t.add(o(n))}),t}function b(e){let t=new Map;return e.forEach((n,p)=>{t.set(p,o(n))}),t}var a={default:()=>null,null:()=>null,undefined:()=>null,boolean:r,number:r,string:r,error:r,date:r,regexp:r,function:f,symbol:i,array:d,object:m,map:b,set:s};function o(e){if(typeof e!="object"||e===null)return e;let t=y(e);return(a[t]||a.default)(e)}function c(e,t){if(typeof e!="object"||typeof t!="object")return e;let n;for(n in e){if(n in t){e[n]=t[n];continue}delete e[n]}return e}return T;})(); | ||
//# sourceMappingURL=harlem-utilities.min.js.map |
{ | ||
"name": "@harlem/utilities", | ||
"amdName": "harlemUtilities", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "author": "Andrew Courtice <andrewcourtice@users.noreply.github.com>", | ||
}, | ||
"gitHead": "e1f809c8b1c367adbaac0b9db6525e3b30801b67" | ||
"gitHead": "89433d0872acf895f639cb0a0bce1a7682118772" | ||
} |
@@ -1,5 +0,7 @@ | ||
function getType(input: any): string { | ||
return Object.prototype.toString.call(input).slice(8, -1); | ||
} | ||
import getType from './get-type'; | ||
import type { | ||
RuntimeType | ||
} from './types'; | ||
function cloneIdentity(input: any): any { | ||
@@ -53,2 +55,4 @@ return input; | ||
default: () => null, | ||
null: () => null, | ||
undefined: () => null, | ||
boolean: cloneBasic, | ||
@@ -66,3 +70,3 @@ number: cloneBasic, | ||
set: cloneSet | ||
} as Record<string, ((value: any) => any)>; | ||
} as Record<RuntimeType | 'default', ((value: any) => any)>; | ||
@@ -74,3 +78,3 @@ export default function clone(value: any) { | ||
const type = getType(value).toLowerCase(); | ||
const type = getType(value); | ||
const cloner = CLONE_MAP[type] || CLONE_MAP.default; | ||
@@ -77,0 +81,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
51635
32
654