@qiwi/uniconfig-plugin-datatree
Advanced tools
Comparing version 2.5.0 to 2.15.0
@@ -0,1 +1,8 @@ | ||
# [@qiwi/uniconfig-plugin-datatree-v2.15.0](https://github.com/qiwi/uniconfig/compare/v2.14.0...v2.15.0) (2018-11-15) | ||
### Features | ||
* **datatree:** full key match has a priority over `get()` result ([000af6e](https://github.com/qiwi/uniconfig/commit/000af6e)) | ||
# [@qiwi/uniconfig-plugin-datatree-v2.5.0](https://github.com/qiwi/uniconfig/compare/v2.4.0...v2.5.0) (2018-10-22) | ||
@@ -2,0 +9,0 @@ |
@@ -41,3 +41,3 @@ "use strict"; | ||
if (source) { | ||
result[key] = path ? (0, _lodashEs.get)(source, path) : source; | ||
result[key] = path ? source[path] || (0, _lodashEs.get)(source, path) : source; | ||
} else {} | ||
@@ -44,0 +44,0 @@ |
@@ -41,3 +41,3 @@ // | ||
result[key] = path | ||
? get(source, path) | ||
? source[path] || get(source, path) | ||
: source | ||
@@ -44,0 +44,0 @@ } else { |
{ | ||
"name": "@qiwi/uniconfig-plugin-datatree", | ||
"version": "2.5.0", | ||
"version": "2.15.0", | ||
"description": "uniconfig datatree plugin", | ||
@@ -5,0 +5,0 @@ "main": "dist/es6/index.js", |
@@ -22,3 +22,4 @@ # @qiwi/uniconfig-plugin-datatree | ||
someParam: '$foo:bar', | ||
otherParam: '$a:b' | ||
otherParam: '$a:b', | ||
anotherParam: '$a:d.e.f.g' | ||
}, | ||
@@ -33,3 +34,4 @@ source: { | ||
data: { | ||
b: 'c' | ||
b: 'c', | ||
'd.e.f.g': 'h' | ||
} | ||
@@ -43,5 +45,6 @@ } | ||
config.get('someParam') // 'baz' | ||
config.get('otherParam') // 'c' | ||
config.get('someParam') // 'baz' | ||
config.get('otherParam') // 'c' | ||
config.get('anotherParam') // 'h' | ||
``` | ||
10749
48