Comparing version 0.2.2 to 0.3.0
export declare function unpartial<T extends object>(base: T, partial: Partial<T> | undefined): T; | ||
export declare function unpartial<T extends object, R extends object = {}>(superBase: R, base: T, partial: Partial<T> | undefined): T & R; | ||
export declare function unpartial<T extends object, R extends object = {}>(superBase: R, base: T | undefined, partial: Partial<T> | undefined): T & R; |
@@ -6,20 +6,21 @@ "use strict"; | ||
if (arguments.length === 3) { | ||
const superBase = arg1; | ||
const base = arg2; | ||
const partial = arg3; | ||
if (superBase === undefined || superBase === null) | ||
return superBase; | ||
if (base === undefined || base === null) | ||
return base; | ||
return defaults({}, partial, base, superBase); | ||
return unpartialTrio(arg1, arg2, arg3); | ||
} | ||
else { | ||
const base = arg1; | ||
const partial = arg2; | ||
if (base === undefined || base === null) | ||
return base; | ||
return defaults({}, partial, base); | ||
return unpartialDuo(arg1, arg2); | ||
} | ||
} | ||
exports.unpartial = unpartial; | ||
function unpartialTrio(superBase, base, partial) { | ||
if (superBase === undefined || superBase === null) | ||
return superBase; | ||
if (base === undefined || base === null) | ||
return unpartial(superBase, partial); | ||
return defaults({}, partial, base, superBase); | ||
} | ||
function unpartialDuo(base, partial) { | ||
if (partial === undefined || partial === null) | ||
return partial; | ||
return defaults({}, partial, base); | ||
} | ||
//# sourceMappingURL=index.js.map |
export declare function unpartial<T extends object>(base: T, partial: Partial<T> | undefined): T; | ||
export declare function unpartial<T extends object, R extends object = {}>(superBase: R, base: T, partial: Partial<T> | undefined): T & R; | ||
export declare function unpartial<T extends object, R extends object = {}>(superBase: R, base: T | undefined, partial: Partial<T> | undefined): T & R; |
@@ -6,20 +6,21 @@ "use strict"; | ||
if (arguments.length === 3) { | ||
var superBase = arg1; | ||
var base = arg2; | ||
var partial = arg3; | ||
if (superBase === undefined || superBase === null) | ||
return superBase; | ||
if (base === undefined || base === null) | ||
return base; | ||
return defaults({}, partial, base, superBase); | ||
return unpartialTrio(arg1, arg2, arg3); | ||
} | ||
else { | ||
var base = arg1; | ||
var partial = arg2; | ||
if (base === undefined || base === null) | ||
return base; | ||
return defaults({}, partial, base); | ||
return unpartialDuo(arg1, arg2); | ||
} | ||
} | ||
exports.unpartial = unpartial; | ||
function unpartialTrio(superBase, base, partial) { | ||
if (superBase === undefined || superBase === null) | ||
return superBase; | ||
if (base === undefined || base === null) | ||
return unpartial(superBase, partial); | ||
return defaults({}, partial, base, superBase); | ||
} | ||
function unpartialDuo(base, partial) { | ||
if (partial === undefined || partial === null) | ||
return partial; | ||
return defaults({}, partial, base); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "unpartial", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "Unpartial a partialed object", | ||
@@ -5,0 +5,0 @@ "main": "dist-es5/index.js", |
Sorry, the diff of this file is not supported yet
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
11506
52