forked from gulpjs/copy-props
/
copy-props.min.js
2 lines (2 loc) · 4.82 KB
/
copy-props.min.js
1
2
!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).copyProps=t()}(function(){return function e(o,i,u){function c(n,t){if(!i[n]){if(!o[n]){var r="function"==typeof require&&require;if(!t&&r)return r(n,!0);if(f)return f(n,!0);throw(r=new Error("Cannot find module '"+n+"'")).code="MODULE_NOT_FOUND",r}r=i[n]={exports:{}},o[n][0].call(r.exports,function(t){return c(o[n][1][t]||t)},r,r.exports,e,o,i,u)}return i[n].exports}for(var f="function"==typeof require&&require,t=0;t<u.length;t++)c(u[t]);return c}({1:[function(t,n,r){"use strict";var i=t("each-props"),c=t("is-plain-object").isPlainObject;function u(t,n,e){if(!c(t)){var o=e.fromto[n];if(o){delete e.fromto[n],Array.isArray(o)||(o=[o]);for(var i={keyChain:n,value:t,key:e.name,depth:e.depth,parent:e.parent},u=0,r=o.length;u<r;u++)p(e.dest,o[u],function(t,n,r){t={keyChain:o[u],value:t[n],key:n,depth:r,parent:t};return e.convert(i,t)})}}}function f(t,e,o){if(c(t)){for(var n in t)return;p(o.dest,e,a)}else{var i={keyChain:e,value:t,key:o.name,depth:o.depth,parent:o.parent};p(o.dest,e,function(t,n,r){t={keyChain:e,value:t[n],key:n,depth:r,parent:t};return o.convert(i,t)})}}function a(){return{}}function s(t){return t.value}function p(t,n,r){!function t(n,r,e,o){var i=r.shift();if(v(i))return;if(!r.length){var u=o(n,i,e);return void 0===u?void 0:c(u)&&c(n[i])?void 0:void(n[i]=u)}c(n[i])||(n[i]={});t(n[i],r,e+1,o)}(t,n.split("."),1,r)}function l(){}function y(t){return"[object Object]"===Object.prototype.toString.call(t)}function v(t){return"__proto__"===t||"constructor"===t}n.exports=function(t,n,r,e,o){y(t)||(t={}),y(n)||(n={}),r=c(r)?function(t){var n,r={};for(n in t){var e=t[n];"string"==typeof e&&(r[n]=e)}return r}(r):Array.isArray(r)?function(t){for(var n={},r=0,e=t.length;r<e;r++){var o=t[r];"string"==typeof o&&(n[o]=o)}return n}(r):("boolean"==typeof r?(o=r,e=s):"function"==typeof r&&(o=e,e=r),null),"function"!=typeof e&&(e=("boolean"==typeof e&&(o=e),s)),(o="boolean"!=typeof o?!1:o)&&(o=t,t=n,n=o,r=r&&function(t){var n,r={};for(n in t){var e=t[n];r[e]||(r[e]=[]),r[e].push(n)}return r}(r));e={dest:n,fromto:r,convert:e};return r?(i(t,u,e),function(t,n){for(var r in n){var e=n[r];Array.isArray(e)||(e=[e]);for(var o=0,i=e.length;o<i;o++)p(t,e[o],l)}}(n,r)):i(t,f,e),n}},{"each-props":4,"is-plain-object":8}],2:[function(t,n,r){"use strict";n.exports=function(t,n,r){if(null!=t)for(var e=t.length,o=-1;++o<e;){var i=t[o];if(!1===n.call(r,i,o,t))break}}},{}],3:[function(t,n,r){"use strict";function i(t,n,r){return n=null==n?r||0:n<0?Math.max(t+n,0):Math.min(n,t)}n.exports=function(t,n,r){var e=t.length,o=[];for(n=i(e,n),r=i(e,r,e);n<r;)o.push(t[n++]);return o}},{}],4:[function(t,n,r){"use strict";var v=t("is-plain-object"),d=t("object.defaults/immutable");n.exports=function(t,n,r){"[object Object]"!==Object.prototype.toString.call(t)||"function"==typeof n&&function t(n,r,e,o,i){var u=Object.keys(n);{var c;"function"==typeof i.sort&&(c=i.sort(u),Array.isArray(c)&&(u=c))}o+=1;for(var f=0,a=u.length;f<a;f++){var s=u[f],p=r+"."+s,l=n[s],y=d(i);y.name=s,y.index=f,y.count=a,y.depth=o,y.parent=n;y=e(l,p.slice(1),y);!y&&v(l)&&t(l,p,e,o,i)}}(t,"",n,0,r=!v(r)?{}:r)}},{"is-plain-object":5,"object.defaults/immutable":10}],5:[function(t,n,r){"use strict";var e=t("isobject");function o(t){return!0===e(t)&&"[object Object]"===Object.prototype.toString.call(t)}n.exports=function(t){return!1!==o(t)&&("function"==typeof(t=t.constructor)&&(!1!==o(t=t.prototype)&&!1!==t.hasOwnProperty("isPrototypeOf")))}},{isobject:9}],6:[function(t,n,r){"use strict";n.exports=function(t,n,r){for(var e in t)if(!1===n.call(r,t[e],e,t))break}},{}],7:[function(t,n,r){"use strict";var i=t("for-in"),u=Object.prototype.hasOwnProperty;n.exports=function(r,e,o){i(r,function(t,n){if(u.call(r,n))return e.call(o,r[n],n,r)})}},{"for-in":6}],8:[function(t,n,r){"use strict";function e(t){return"[object Object]"===Object.prototype.toString.call(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=function(t){return!1!==e(t)&&(void 0===(t=t.constructor)||!1!==e(t=t.prototype)&&!1!==t.hasOwnProperty("isPrototypeOf"))}},{}],9:[function(t,n,r){"use strict";n.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},{}],10:[function(t,n,r){"use strict";var e=t("array-slice"),o=t("./mutable");n.exports=function(){var t=e(arguments);return o.apply(null,[{}].concat(t))}},{"./mutable":11,"array-slice":3}],11:[function(t,n,r){"use strict";var e=t("array-each"),o=t("array-slice"),i=t("for-own"),u=t("isobject");n.exports=function(r,t){return null==r?{}:(e(o(arguments,1),function(t){u(t)&&i(t,function(t,n){null==r[n]&&(r[n]=t)})}),r)}},{"array-each":2,"array-slice":3,"for-own":7,isobject:9}]},{},[1])(1)});
//# sourceMappingURL=copy-props.min.js.map