Comparing version 1.1.0 to 1.1.1
@@ -14,7 +14,7 @@ export declare class Eredita { | ||
static dot(data: any, path: string, value?: any): any; | ||
static deepExtend(target: any, ...args: any[]): any; | ||
static deepExtend(target: any, ...args: object[]): any; | ||
} | ||
export declare const deepExtend: typeof Eredita.deepExtend; | ||
export declare function mixin(): { | ||
deepExtend: (target: any, ...args: any[]) => any; | ||
deepExtend: (target: any, ...args: object[]) => any; | ||
}; |
@@ -83,5 +83,8 @@ "use strict"; | ||
static deepExtend(target, ...args) { | ||
if (!target || typeof target !== 'object') { | ||
if (!target) { | ||
throw new Error('missing target'); | ||
} | ||
else if (typeof target !== 'object') { | ||
throw new Error('invalid target'); | ||
} | ||
else if (!args.length) { | ||
@@ -92,7 +95,6 @@ return target; | ||
for (let obj of args) { | ||
if (typeof obj !== 'object') | ||
return; | ||
if (typeof obj !== 'object') { | ||
throw new Error('invalid argument'); | ||
} | ||
for (key in obj) { | ||
if (!(key in obj)) | ||
continue; | ||
src = target[key]; | ||
@@ -99,0 +101,0 @@ val = obj[key]; |
{ | ||
"name": "eredita", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Javascript Data Inheritance", | ||
@@ -8,3 +8,4 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"clean": "rimraf dist coverage .nyc_output node_modules", | ||
"clean": "rimraf dist coverage .nyc_output", | ||
"clean:all": "npm run clean && rimraf node_modules", | ||
"prebuild": "rimraf dist", | ||
@@ -14,3 +15,3 @@ "build": "tsc", | ||
"commit": "git-cz", | ||
"check-coverage": "nyc check-coverage --statements 80 --branches 80 --functions 80 --lines 80", | ||
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100", | ||
"report-coverage": "cat ./coverage/lcov.info | coveralls", | ||
@@ -58,3 +59,4 @@ "watch:test": "npm t -- -w", | ||
"semantic-release": "^6.3.6", | ||
"typescript": "2.3.2" | ||
"typescript": "2.3.2", | ||
"underscore": "1.8.3" | ||
}, | ||
@@ -61,0 +63,0 @@ "config": { |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13434
159
0
15