@contrail/util
Advanced tools
Comparing version 1.0.59 to 1.0.60
@@ -9,2 +9,3 @@ import { cloneDeep } from './cloneDeep/cloneDeep'; | ||
static getByPath(obj: any, path: string, def?: any): any; | ||
getBySlugs(obj: any, rootSlug: string, slug: string): any; | ||
static setByPath(obj: any, path: string, value: any): void; | ||
@@ -11,0 +12,0 @@ static chunk(array: any[], size: number): any[]; |
@@ -22,2 +22,9 @@ "use strict"; | ||
} | ||
getBySlugs(obj, rootSlug, slug) { | ||
const rootValue = obj[rootSlug]; | ||
if (rootValue) { | ||
return rootValue[slug]; | ||
} | ||
return rootValue; | ||
} | ||
static setByPath(obj, path, value) { | ||
@@ -24,0 +31,0 @@ const a = path.split('.'); |
{ | ||
"name": "@contrail/util", | ||
"version": "1.0.59", | ||
"version": "1.0.60", | ||
"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
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
38571
879