@ts-common/source-map
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -40,1 +40,2 @@ import { StringMap } from "@ts-common/string-map"; | ||
export declare const getPath: (info: ObjectInfo) => ReadonlyArray<string | number>; | ||
export declare const cloneDeep: <T extends Data>(source: T) => T; |
14
index.js
@@ -105,2 +105,16 @@ "use strict"; | ||
exports.getPath = (info) => _.reverse(getReversedPath(info)); | ||
exports.cloneDeep = (source) => { | ||
const data = source; | ||
if (data === null || | ||
typeof data === "boolean" || | ||
typeof data === "number" || | ||
typeof data === "string") { | ||
return source; | ||
} | ||
const result = Array.isArray(data) ? | ||
data.map(exports.cloneDeep) : | ||
sm.map(data, exports.cloneDeep); | ||
exports.copyInfo(data, result); | ||
return result; | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ts-common/source-map", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Source Map", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
19531
158