@contrail/util
Advanced tools
Comparing version 1.0.6 to 1.0.7
export * from './object-util'; | ||
export * from './string-util'; |
@@ -14,1 +14,2 @@ "use strict"; | ||
__exportStar(require("./object-util"), exports); | ||
__exportStar(require("./string-util"), exports); |
export declare class ObjectUtil { | ||
static getByPath(obj: any, path: string, def?: string): any; | ||
static setByPath(obj: any, path: string, value: any): void; | ||
} |
@@ -13,3 +13,3 @@ "use strict"; | ||
}); | ||
if (obj === undefined) { | ||
if (!obj || obj === undefined) { | ||
return def; | ||
@@ -19,3 +19,14 @@ } | ||
} | ||
static setByPath(obj, path, value) { | ||
var a = path.split('.'); | ||
var o = obj; | ||
while (a.length - 1) { | ||
var n = a.shift(); | ||
if (!(n in o)) | ||
o[n] = {}; | ||
o = o[n]; | ||
} | ||
o[a[0]] = value; | ||
} | ||
} | ||
exports.ObjectUtil = ObjectUtil; |
{ | ||
"name": "@contrail/util", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "General javascript utilities", | ||
@@ -5,0 +5,0 @@ "main": "lib/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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
5114
10
107