Comparing version 2.0.2 to 2.0.3
@@ -5,2 +5,9 @@ # Changelog | ||
### [2.0.3](https://github.com/nuxt-contrib/defu/compare/v2.0.2...v2.0.3) (2020-05-22) | ||
### Bug Fixes | ||
* specify type declaration file more precisely ([#15](https://github.com/nuxt-contrib/defu/issues/15)) ([6aa47d4](https://github.com/nuxt-contrib/defu/commit/6aa47d4a06a117b34b5e9231b04f8403056c2685)) | ||
### [2.0.2](https://github.com/nuxt-contrib/defu/compare/v2.0.1...v2.0.2) (2020-04-19) | ||
@@ -7,0 +14,0 @@ |
@@ -34,8 +34,8 @@ 'use strict'; | ||
for (var _key in baseObj) { | ||
if (_key === '__proto__' || _key === 'constructor') { | ||
for (var key in baseObj) { | ||
if (key === '__proto__' || key === 'constructor') { | ||
continue; | ||
} | ||
var val = baseObj[_key]; | ||
var val = baseObj[key]; | ||
@@ -46,6 +46,6 @@ if (val === null) { | ||
if (isObject(val) && isObject(obj[_key])) { | ||
obj[_key] = _defu(val, obj[_key]); | ||
if (isObject(val) && isObject(obj[key])) { | ||
obj[key] = _defu(val, obj[key]); | ||
} else { | ||
obj[_key] = val; | ||
obj[key] = val; | ||
} | ||
@@ -58,4 +58,4 @@ } | ||
function defu() { | ||
for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
@@ -62,0 +62,0 @@ |
{ | ||
"name": "defu", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Recursively assign default properties. Lightweight and Fast!", | ||
@@ -8,4 +8,3 @@ "repository": "nuxt-contrib/defu", | ||
"main": "./dist/defu.js", | ||
"browser": "./dist/defu.min.js", | ||
"types": "./types", | ||
"types": "./defu/defu.d.ts", | ||
"files": [ | ||
@@ -16,3 +15,3 @@ "dist", | ||
"scripts": { | ||
"build": "rollup -c && tsc --emitDeclarationOnly", | ||
"build": "bili src/defu.ts", | ||
"lint": "eslint --ext .ts src", | ||
@@ -24,13 +23,9 @@ "prepublish": "yarn build", | ||
"devDependencies": { | ||
"@babel/preset-env": "latest", | ||
"@babel/preset-typescript": "latest", | ||
"@nuxtjs/eslint-config-typescript": "latest", | ||
"@types/jest": "latest", | ||
"@types/node": "latest", | ||
"bili": "latest", | ||
"eslint": "latest", | ||
"jest": "latest", | ||
"rollup": "latest", | ||
"rollup-plugin-babel": "latest", | ||
"rollup-plugin-node-resolve": "latest", | ||
"rollup-plugin-terser": "latest", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
"standard-version": "latest", | ||
@@ -37,0 +32,0 @@ "ts-jest": "latest", |
@@ -32,3 +32,3 @@ # 🇩 defu | ||
```js | ||
const options = defu (object, defaults...) | ||
const options = defu (object, ...defaults) | ||
``` | ||
@@ -35,0 +35,0 @@ |
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
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
10
7548
6
53