Comparing version 1.1.0 to 1.1.1
@@ -65,6 +65,2 @@ 'use strict'; | ||
if(type === 'boolean' && target === false || type !== 'boolean' && type !== 'object' || target === null){ | ||
throw new Error('You passed an invalid argument as the target. This should either be an object or true for deep copy.'); | ||
} | ||
if(type === 'boolean'){ | ||
@@ -71,0 +67,0 @@ deep = target; |
@@ -1,1 +0,1 @@ | ||
var blend=function(){var o=function(o){return!("object"!=typeof o||o&&o.nodeType||null!==o&&o===o.window||o&&o.constructor&&!Object.prototype.hasOwnProperty.call(o.constructor.prototype,"isPrototypeOf"))},r=function(o){for(var r=o.concat(),n=0;n<r.length;++n)for(var e=n+1;e<r.length;++e)r[n]===r[e]&&r.splice(e--,1);return r},n=function(e){var t=1,a=!1,c=!1,i=typeof e;if("boolean"===i&&e===!1||"boolean"!==i&&"object"!==i||null===e)throw new Error("You passed an invalid argument as the target. This should either be an object or true for deep copy.");return"boolean"===i&&(a=e,e=arguments[1]||{},t++,"boolean"==typeof e&&(c=e,e=arguments[2]||{},t++)),[].slice.call(arguments,t).forEach(function(t){var i,f,l,u;if(t!==e)if(a&&t instanceof Array)e=c?r(e.concat(t)):e.concat(t);else for(var s in t)i=e[s],f=t[s],e!==f&&i!==f&&((l=f instanceof Array)||a&&f&&o(f)?(u=l?i&&i instanceof Array?i:[]:i&&o(i)?i:{},l=!1,c?e[s]=n(a,c,u,f):e[s]=n(a,u,f)):void 0!==f&&(e[s]=f))}),e};return n}(); | ||
"use strict";function exporter(e,n){"function"==typeof define?define(n):"object"==typeof exports?module.exports=n:"undefined"!=typeof window&&(window[e]=n)}var blend=function(){var e=function(e){return!("object"!=typeof e||e&&e.nodeType||null!==e&&e===e.window||e&&e.constructor&&!Object.prototype.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))},n=function(e){for(var n=e.concat(),o=0;o<n.length;++o)for(var t=o+1;t<n.length;++t)n[o]===n[t]&&n.splice(t--,1);return n},o=function(t){var r=1,c=!1,f=!1,a=typeof t;return"boolean"===a&&(c=t,t=arguments[1]||{},r++,"boolean"==typeof t&&(f=t,t=arguments[2]||{},r++)),[].slice.call(arguments,r).forEach(function(r){var a,i,u,p;if(r!==t)if(c&&r instanceof Array)t=f?n(t.concat(r)):t.concat(r);else for(var l in r)a=t[l],i=r[l],t!==i&&a!==i&&((u=i instanceof Array)||c&&i&&e(i)?(p=u?a&&a instanceof Array?a:[]:a&&e(a)?a:{},u=!1,f?t[l]=o(c,f,p,i):t[l]=o(c,p,i)):void 0!==i&&(t[l]=i))}),t};return o}();exporter("blend",blend); |
{ | ||
"name": "blend.js", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Micro library for performing shallow/deep copying of objects with support for array merging + dedup", | ||
@@ -5,0 +5,0 @@ "author": "Kieran Boyle <norcal.kieran@gmail.com>", |
#blend.js | ||
Micro-lib for performing shallow/deep copying of objects with support for array merging + dedup | ||
Micro library for performing shallow/deep copying of objects with support for array merging + dedup | ||
@@ -4,0 +4,0 @@ # Extend for Node, CommonJS, Browserify, AMD and Browser |
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
9627
177