@trezor/schema-utils
Advanced tools
Comparing version 1.0.3 to 1.0.4-beta.1
@@ -0,1 +1,5 @@ | ||
# 1.0.4-beta.1 | ||
- feat(connect-explorer-nextra): method json params editor (09086d0f1a) | ||
# 1.0.3 | ||
@@ -2,0 +6,0 @@ |
export declare function setDeepValue(obj: any, [prop, ...path]: string[], value: any): void; | ||
export declare function getDeepValue(obj: any, [prop, ...path]: (string | number)[]): any; | ||
//# sourceMappingURL=utils.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.setDeepValue = void 0; | ||
exports.getDeepValue = exports.setDeepValue = void 0; | ||
function setDeepValue(obj, [prop, ...path], value) { | ||
@@ -15,2 +15,13 @@ if (!path.length) { | ||
exports.setDeepValue = setDeepValue; | ||
function getDeepValue(obj, [prop, ...path]) { | ||
if (!path.length) { | ||
return obj[prop]; | ||
} | ||
else { | ||
if (!(prop in obj)) | ||
return undefined; | ||
return getDeepValue(obj[prop], path); | ||
} | ||
} | ||
exports.getDeepValue = getDeepValue; | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@trezor/schema-utils", | ||
"version": "1.0.3", | ||
"version": "1.0.4-beta.1", | ||
"license": "See LICENSE.md in repo root", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
38361
348
2