Update to v13 and add queue and completely change code

This commit is contained in:
a 2021-12-06 16:34:00 +01:00
parent dcef23d0ed
commit 55a38726a3
6706 changed files with 424137 additions and 61608 deletions

26
node_modules/ext/test/object/clear.js generated vendored Normal file
View file

@ -0,0 +1,26 @@
"use strict";
var assert = require("chai").assert
, clear = require("../../object/clear");
describe("object/clear", function () {
it("Should clear enumerable properties", function () {
var obj = { foo: "bar", elo: "sfds" };
clear(obj);
// eslint-disable-next-line no-unreachable-loop
for (var key in obj) throw new Error("Unexpected" + key);
});
it("Should return input object", function () {
var obj = {};
assert.equal(clear(obj), obj);
});
if (Object.defineProperty && Object.keys) {
it("Should keep non enumerable properties", function () {
var obj = { foo: "bar", elo: "sfds" };
Object.defineProperty(obj, "hidden", { value: "some" });
clear(obj);
assert.deepEqual(Object.keys(obj), []);
assert.equal(obj.hidden, "some");
});
}
});

24
node_modules/ext/test/object/entries/_tests.js generated vendored Normal file
View file

@ -0,0 +1,24 @@
"use strict";
var assert = require("chai").assert;
module.exports = function (entries) {
it("Should resolve entries array for an object", function () {
assert.deepEqual(entries({ foo: "bar" }), [["foo", "bar"]]);
});
if (Object.defineProperty) {
it("Should not resolve non-enumerable properties", function () {
var obj = { visible: true };
Object.defineProperty(obj, "hidden", { value: "elo" });
assert.deepEqual(entries(obj), [["visible", true]]);
});
}
it("Should resolve entries array for a primitive", function () {
assert.deepEqual(entries("raz"), [
["0", "r"], ["1", "a"], ["2", "z"]
]);
});
it("Should throw on non-value", function () {
assert["throws"](function () { entries(null); }, TypeError);
});
};

View file

@ -0,0 +1,6 @@
"use strict";
var entries = require("../../../object/entries/implementation")
, tests = require("./_tests");
describe("object/entries/implementation", function () { tests(entries); });

6
node_modules/ext/test/object/entries/index.js generated vendored Normal file
View file

@ -0,0 +1,6 @@
"use strict";
var entries = require("../../../object/entries")
, tests = require("./_tests");
describe("object/entries/index", function () { tests(entries); });

View file

@ -0,0 +1,8 @@
"use strict";
var assert = require("chai").assert
, isImplemented = require("../../../object/entries/is-implemented");
describe("object/entries/is-implemented", function () {
assert.equal(typeof isImplemented(), "boolean");
});