Socket
Socket
Sign inDemoInstall

defu

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defu - npm Package Compare versions

Comparing version 0.0.1 to 0.0.3

10

CHANGELOG.md

@@ -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)

12

lib/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc