mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 20:30:04 +02:00
add some packages
This commit is contained in:
28
node_modules/core-js/modules/_fix-re-wks.js
generated
vendored
Normal file
28
node_modules/core-js/modules/_fix-re-wks.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
var hide = require('./_hide');
|
||||
var redefine = require('./_redefine');
|
||||
var fails = require('./_fails');
|
||||
var defined = require('./_defined');
|
||||
var wks = require('./_wks');
|
||||
|
||||
module.exports = function (KEY, length, exec) {
|
||||
var SYMBOL = wks(KEY);
|
||||
var fns = exec(defined, SYMBOL, ''[KEY]);
|
||||
var strfn = fns[0];
|
||||
var rxfn = fns[1];
|
||||
if (fails(function () {
|
||||
var O = {};
|
||||
O[SYMBOL] = function () { return 7; };
|
||||
return ''[KEY](O) != 7;
|
||||
})) {
|
||||
redefine(String.prototype, KEY, strfn);
|
||||
hide(RegExp.prototype, SYMBOL, length == 2
|
||||
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
||||
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
||||
? function (string, arg) { return rxfn.call(string, this, arg); }
|
||||
// 21.2.5.6 RegExp.prototype[@@match](string)
|
||||
// 21.2.5.9 RegExp.prototype[@@search](string)
|
||||
: function (string) { return rxfn.call(string, this); }
|
||||
);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user