mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
add some packages
This commit is contained in:
31
node_modules/core-js/modules/_redefine.js
generated
vendored
Normal file
31
node_modules/core-js/modules/_redefine.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
var global = require('./_global');
|
||||
var hide = require('./_hide');
|
||||
var has = require('./_has');
|
||||
var SRC = require('./_uid')('src');
|
||||
var TO_STRING = 'toString';
|
||||
var $toString = Function[TO_STRING];
|
||||
var TPL = ('' + $toString).split(TO_STRING);
|
||||
|
||||
require('./_core').inspectSource = function (it) {
|
||||
return $toString.call(it);
|
||||
};
|
||||
|
||||
(module.exports = function (O, key, val, safe) {
|
||||
var isFunction = typeof val == 'function';
|
||||
if (isFunction) has(val, 'name') || hide(val, 'name', key);
|
||||
if (O[key] === val) return;
|
||||
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
|
||||
if (O === global) {
|
||||
O[key] = val;
|
||||
} else if (!safe) {
|
||||
delete O[key];
|
||||
hide(O, key, val);
|
||||
} else if (O[key]) {
|
||||
O[key] = val;
|
||||
} else {
|
||||
hide(O, key, val);
|
||||
}
|
||||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
||||
})(Function.prototype, TO_STRING, function toString() {
|
||||
return typeof this == 'function' && this[SRC] || $toString.call(this);
|
||||
});
|
Reference in New Issue
Block a user