Comparing version 0.0.1 to 0.0.3
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="0.0.3"></a> | ||
## [0.0.3](https://github.com/jsless/defu/compare/v0.0.1...v0.0.3) (2019-05-25) | ||
<a name="0.0.2"></a> | ||
## [0.0.2](https://github.com/jesless/defu/compare/v0.0.1...v0.0.2) (2019-05-25) | ||
<a name="0.0.1"></a> | ||
@@ -7,0 +17,0 @@ ## 0.0.1 (2019-02-07) |
@@ -14,13 +14,13 @@ function isObject (val) { | ||
const obj = Object.assign({}, _defaults) | ||
var obj = Object.assign({}, _defaults) | ||
for (const key in _obj) { | ||
Object.keys(_obj).forEach((key) => { | ||
if (key === '__proto__' || key === 'constructor') { | ||
continue | ||
return | ||
} | ||
const val = _obj[key] | ||
var val = _obj[key] | ||
if (val === null) { | ||
continue | ||
return | ||
} | ||
@@ -33,3 +33,3 @@ | ||
} | ||
} | ||
}) | ||
@@ -36,0 +36,0 @@ return obj |
{ | ||
"name": "defu", | ||
"version": "0.0.1", | ||
"version": "0.0.3", | ||
"main": "lib/index.js", | ||
"license": "MIT", | ||
"description": "Recursively assign default properties. Lightweight and Fast!", | ||
"repository": "jesless/defu", | ||
"repository": "jsless/defu", | ||
"contributes": [ | ||
@@ -9,0 +9,0 @@ "Pooya Parsa <pooya@pi0.ir>" |
@@ -13,2 +13,3 @@ # 🇩 defu | ||
[![package phobia][packagephobia-src]][packagephobia-href] | ||
[![bundle phobia][bundlephobia-src]][bundlephobia-href] | ||
@@ -32,3 +33,3 @@ ## Install | ||
```js | ||
defu (object, defaults) | ||
const options = defu (object, defaults) | ||
``` | ||
@@ -50,4 +51,6 @@ | ||
Assignment of `__proto__` and `constructor` keys will be skipped to prevent security issues with object pollution. | ||
- `object` and `defaults` are not modified | ||
- Assignment of `__proto__` and `constructor` keys will be skipped to prevent security issues with object pollution. | ||
## License | ||
@@ -70,2 +73,5 @@ | ||
[bundlephobia-src]: https://flat.badgen.net/bundlephobia/min/defu | ||
[bundlephobia-href]: https://bundlephobia.com/result?p=defu | ||
[david-src]: https://flat.badgen.net/david/dep/jsless/defu | ||
@@ -72,0 +78,0 @@ [david-href]: https://david-dm.org/jsless/defu |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5151
81