@lowdefy/helpers
Advanced tools
Comparing version 3.1.1 to 3.3.0
@@ -6,2 +6,34 @@ # Change Log | ||
# [3.3.0](https://github.com/lowdefy/lowdefy/compare/v3.1.1...v3.3.0) (2021-01-18) | ||
### Bug Fixes | ||
* **deps:** update dependency query-string to v6.13.8 ([17bdbb8](https://github.com/lowdefy/lowdefy/commit/17bdbb8ad2e67dd10c0749beb838090985f0ec66)) | ||
### Features | ||
* Add copy option to get. ([9d5b40f](https://github.com/lowdefy/lowdefy/commit/9d5b40f922c95929203b641457231af82d69b6f2)) | ||
# [3.2.0](https://github.com/lowdefy/lowdefy/compare/v3.1.1...v3.2.0) (2021-01-18) | ||
### Bug Fixes | ||
* **deps:** update dependency query-string to v6.13.8 ([17bdbb8](https://github.com/lowdefy/lowdefy/commit/17bdbb8ad2e67dd10c0749beb838090985f0ec66)) | ||
### Features | ||
* Add copy option to get. ([9d5b40f](https://github.com/lowdefy/lowdefy/commit/9d5b40f922c95929203b641457231af82d69b6f2)) | ||
## [1.2.2](https://github.com/lowdefy/lowdefy/compare/@lowdefy/helpers@1.2.0...@lowdefy/helpers@1.2.2) (2020-12-15) | ||
@@ -8,0 +40,0 @@ |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _serializer = _interopRequireDefault(require("./serializer")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -78,9 +80,3 @@ | ||
function get(target, path, options) { | ||
if (!_type.default.isObject(options)) { | ||
options = { | ||
default: options | ||
}; | ||
} | ||
function getter(target, path, options) { | ||
if (_type.default.isNone(path) || !isValidObject(target)) { | ||
@@ -159,3 +155,17 @@ return typeof options.default !== 'undefined' ? options.default : undefined; | ||
function get(target, path, options) { | ||
if (!_type.default.isObject(options)) { | ||
options = { | ||
default: options | ||
}; | ||
} | ||
if (options.copy) { | ||
return _serializer.default.copy(getter(target, path, options)); | ||
} | ||
return getter(target, path, options); | ||
} | ||
var _default = get; | ||
exports.default = _default; |
{ | ||
"name": "@lowdefy/helpers", | ||
"version": "3.1.1", | ||
"version": "3.3.0", | ||
"licence": "Apache-2.0", | ||
@@ -41,3 +41,3 @@ "description": "", | ||
"lodash.merge": "4.6.2", | ||
"query-string": "6.13.7" | ||
"query-string": "6.13.8" | ||
}, | ||
@@ -47,3 +47,3 @@ "devDependencies": { | ||
"@babel/core": "7.12.10", | ||
"@babel/preset-env": "7.12.10", | ||
"@babel/preset-env": "7.12.11", | ||
"babel-jest": "26.6.3", | ||
@@ -55,3 +55,4 @@ "jest": "26.6.3", | ||
"access": "public" | ||
} | ||
}, | ||
"gitHead": "087a3f5779a5dee308d810dde10e70ec0ecea8bb" | ||
} |
55239
15
1047
+ Addedquery-string@6.13.8(transitive)
- Removedquery-string@6.13.7(transitive)
Updatedquery-string@6.13.8