0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

10
web/node_modules/es5-ext/array/#/fill/implement.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
"use strict";
if (!require("./is-implemented")()) {
Object.defineProperty(Array.prototype, "fill", {
value: require("./shim"),
configurable: true,
enumerable: false,
writable: true
});
}

3
web/node_modules/es5-ext/array/#/fill/index.js generated vendored Normal file
View file

@ -0,0 +1,3 @@
"use strict";
module.exports = require("./is-implemented")() ? Array.prototype.fill : require("./shim");

View file

@ -0,0 +1,7 @@
"use strict";
module.exports = function () {
var arr = [1, 2, 3, 4, 5, 6];
if (typeof arr.fill !== "function") return false;
return String(arr.fill(-1, -3)) === "1,2,3,-1,-1,-1";
};

25
web/node_modules/es5-ext/array/#/fill/shim.js generated vendored Normal file
View file

@ -0,0 +1,25 @@
// Taken from: https://github.com/paulmillr/es6-shim/
"use strict";
var toInteger = require("../../../number/to-integer")
, toPosInt = require("../../../number/to-pos-integer")
, validValue = require("../../../object/valid-value")
, max = Math.max
, min = Math.min;
module.exports = function (value/*, start, end*/) {
var arr = validValue(this)
, start = arguments[1]
, end = arguments[2]
, length = toPosInt(arr.length)
, relativeStart
, i;
start = start === undefined ? 0 : toInteger(start);
end = end === undefined ? length : toInteger(end);
relativeStart = start < 0 ? max(length + start, 0) : min(start, length);
for (i = relativeStart; i < length && i < end; ++i) arr[i] = value;
return arr;
};