mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-22 23:49:15 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
5
web/node_modules/es5-ext/test/string/#/@@iterator/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/#/@@iterator/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../../string/#/@@iterator/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/#/@@iterator/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/@@iterator/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
9
web/node_modules/es5-ext/test/string/#/@@iterator/shim.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/test/string/#/@@iterator/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
var it = t.call("r💩z");
|
||||
a.deep(it.next(), { done: false, value: "r" }, "#1");
|
||||
a.deep(it.next(), { done: false, value: "💩" }, "#2");
|
||||
a.deep(it.next(), { done: false, value: "z" }, "#3");
|
||||
a.deep(it.next(), { done: true, value: undefined }, "End");
|
||||
};
|
97
web/node_modules/es5-ext/test/string/#/at.js
generated
vendored
Normal file
97
web/node_modules/es5-ext/test/string/#/at.js
generated
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
/* eslint no-useless-call: "off" */
|
||||
// See tests at https://github.com/mathiasbynens/String.prototype.at
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.length, 1, "Length");
|
||||
|
||||
a.h1("BMP");
|
||||
a(t.call("abc\uD834\uDF06def", -Infinity), "", "-Infinity");
|
||||
a(t.call("abc\uD834\uDF06def", -1), "", "-1");
|
||||
a(t.call("abc\uD834\uDF06def", -0), "a", "-0");
|
||||
a(t.call("abc\uD834\uDF06def", +0), "a", "+0");
|
||||
a(t.call("abc\uD834\uDF06def", 1), "b", "1");
|
||||
a(t.call("abc\uD834\uDF06def", 3), "\uD834\uDF06", "3");
|
||||
a(t.call("abc\uD834\uDF06def", 4), "\uDF06", "4");
|
||||
a(t.call("abc\uD834\uDF06def", 5), "d", "5");
|
||||
a(t.call("abc\uD834\uDF06def", 42), "", "42");
|
||||
a(t.call("abc\uD834\uDF06def", Number(Infinity)), "", "+Infinity");
|
||||
a(t.call("abc\uD834\uDF06def", null), "a", "null");
|
||||
a(t.call("abc\uD834\uDF06def", undefined), "a", "undefined");
|
||||
a(t.call("abc\uD834\uDF06def"), "a", "No argument");
|
||||
a(t.call("abc\uD834\uDF06def", false), "a", "false");
|
||||
a(t.call("abc\uD834\uDF06def", NaN), "a", "NaN");
|
||||
a(t.call("abc\uD834\uDF06def", ""), "a", "Empty string");
|
||||
a(t.call("abc\uD834\uDF06def", "_"), "a", "_");
|
||||
a(t.call("abc\uD834\uDF06def", "1"), "b", "'1'");
|
||||
a(t.call("abc\uD834\uDF06def", []), "a", "[]");
|
||||
a(t.call("abc\uD834\uDF06def", {}), "a", "{}");
|
||||
a(t.call("abc\uD834\uDF06def", -0.9), "a", "-0.9");
|
||||
a(t.call("abc\uD834\uDF06def", 1.9), "b", "1.9");
|
||||
a(t.call("abc\uD834\uDF06def", 7.9), "f", "7.9");
|
||||
a(t.call("abc\uD834\uDF06def", Math.pow(2, 32)), "", "Big number");
|
||||
|
||||
a.h1("Astral symbol");
|
||||
a(t.call("\uD834\uDF06def", -Infinity), "", "-Infinity");
|
||||
a(t.call("\uD834\uDF06def", -1), "", "-1");
|
||||
a(t.call("\uD834\uDF06def", -0), "\uD834\uDF06", "-0");
|
||||
a(t.call("\uD834\uDF06def", +0), "\uD834\uDF06", "+0");
|
||||
a(t.call("\uD834\uDF06def", 1), "\uDF06", "1");
|
||||
a(t.call("\uD834\uDF06def", 2), "d", "2");
|
||||
a(t.call("\uD834\uDF06def", 3), "e", "3");
|
||||
a(t.call("\uD834\uDF06def", 4), "f", "4");
|
||||
a(t.call("\uD834\uDF06def", 42), "", "42");
|
||||
a(t.call("\uD834\uDF06def", Number(Infinity)), "", "+Infinity");
|
||||
a(t.call("\uD834\uDF06def", null), "\uD834\uDF06", "null");
|
||||
a(t.call("\uD834\uDF06def", undefined), "\uD834\uDF06", "undefined");
|
||||
a(t.call("\uD834\uDF06def"), "\uD834\uDF06", "No arguments");
|
||||
a(t.call("\uD834\uDF06def", false), "\uD834\uDF06", "false");
|
||||
a(t.call("\uD834\uDF06def", NaN), "\uD834\uDF06", "NaN");
|
||||
a(t.call("\uD834\uDF06def", ""), "\uD834\uDF06", "Empty string");
|
||||
a(t.call("\uD834\uDF06def", "_"), "\uD834\uDF06", "_");
|
||||
a(t.call("\uD834\uDF06def", "1"), "\uDF06", "'1'");
|
||||
|
||||
a.h1("Lone high surrogates");
|
||||
a(t.call("\uD834abc", -Infinity), "", "-Infinity");
|
||||
a(t.call("\uD834abc", -1), "", "-1");
|
||||
a(t.call("\uD834abc", -0), "\uD834", "-0");
|
||||
a(t.call("\uD834abc", +0), "\uD834", "+0");
|
||||
a(t.call("\uD834abc", 1), "a", "1");
|
||||
a(t.call("\uD834abc", 42), "", "42");
|
||||
a(t.call("\uD834abc", Number(Infinity)), "", "Infinity");
|
||||
a(t.call("\uD834abc", null), "\uD834", "null");
|
||||
a(t.call("\uD834abc", undefined), "\uD834", "undefined");
|
||||
a(t.call("\uD834abc"), "\uD834", "No arguments");
|
||||
a(t.call("\uD834abc", false), "\uD834", "false");
|
||||
a(t.call("\uD834abc", NaN), "\uD834", "NaN");
|
||||
a(t.call("\uD834abc", ""), "\uD834", "Empty string");
|
||||
a(t.call("\uD834abc", "_"), "\uD834", "_");
|
||||
a(t.call("\uD834abc", "1"), "a", "'a'");
|
||||
|
||||
a.h1("Lone low surrogates");
|
||||
a(t.call("\uDF06abc", -Infinity), "", "-Infinity");
|
||||
a(t.call("\uDF06abc", -1), "", "-1");
|
||||
a(t.call("\uDF06abc", -0), "\uDF06", "-0");
|
||||
a(t.call("\uDF06abc", +0), "\uDF06", "+0");
|
||||
a(t.call("\uDF06abc", 1), "a", "1");
|
||||
a(t.call("\uDF06abc", 42), "", "42");
|
||||
a(t.call("\uDF06abc", Number(Infinity)), "", "+Infinity");
|
||||
a(t.call("\uDF06abc", null), "\uDF06", "null");
|
||||
a(t.call("\uDF06abc", undefined), "\uDF06", "undefined");
|
||||
a(t.call("\uDF06abc"), "\uDF06", "No arguments");
|
||||
a(t.call("\uDF06abc", false), "\uDF06", "false");
|
||||
a(t.call("\uDF06abc", NaN), "\uDF06", "NaN");
|
||||
a(t.call("\uDF06abc", ""), "\uDF06", "Empty string");
|
||||
a(t.call("\uDF06abc", "_"), "\uDF06", "_");
|
||||
a(t.call("\uDF06abc", "1"), "a", "'1'");
|
||||
|
||||
a.h1("Context");
|
||||
a.throws(function () { t.call(undefined); }, TypeError, "Undefined");
|
||||
a.throws(function () { t.call(undefined, 4); }, TypeError, "Undefined + argument");
|
||||
a.throws(function () { t.call(null); }, TypeError, "Null");
|
||||
a.throws(function () { t.call(null, 4); }, TypeError, "Null + argument");
|
||||
a(t.call(42, 0), "4", "Number #1");
|
||||
a(t.call(42, 1), "2", "Number #2");
|
||||
a(t.call({ toString: function () { return "abc"; } }, 2), "c", "Object");
|
||||
};
|
7
web/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("razDwaTRzy4yFoo45My"), "raz-dwa-t-rzy4y-foo45-my");
|
||||
a(t.call("razDwaTRzy4yFoo45My-"), "raz-dwa-t-rzy4y-foo45-my-");
|
||||
a(t.call("razDwaTRzy4yFoo45My--"), "raz-dwa-t-rzy4y-foo45-my--");
|
||||
};
|
9
web/node_modules/es5-ext/test/string/#/capitalize.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/test/string/#/capitalize.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("raz"), "Raz", "Word");
|
||||
a(t.call("BLA"), "BLA", "Uppercase");
|
||||
a(t.call(""), "", "Empty");
|
||||
a(t.call("a"), "A", "One letter");
|
||||
a(t.call("this is a test"), "This is a test", "Sentence");
|
||||
};
|
7
web/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("AA", "aa"), 0, "Same");
|
||||
a.ok(t.call("Amber", "zebra") < 0, "Less");
|
||||
a.ok(t.call("Zebra", "amber") > 0, "Greater");
|
||||
};
|
5
web/node_modules/es5-ext/test/string/#/code-point-at/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/#/code-point-at/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../../string/#/code-point-at/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/#/code-point-at/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/code-point-at/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
83
web/node_modules/es5-ext/test/string/#/code-point-at/shim.js
generated
vendored
Normal file
83
web/node_modules/es5-ext/test/string/#/code-point-at/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
/* eslint no-useless-call: "off" */
|
||||
|
||||
// Taken from: https://github.com/mathiasbynens/String.prototype.codePointAt
|
||||
// /blob/master/tests/tests.js
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.length, 1, "Length");
|
||||
|
||||
// String that starts with a BMP symbol
|
||||
a(t.call("abc\uD834\uDF06def", ""), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def", "_"), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def"), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def", -Infinity), undefined);
|
||||
a(t.call("abc\uD834\uDF06def", -1), undefined);
|
||||
a(t.call("abc\uD834\uDF06def", -0), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def", 0), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def", 3), 0x1d306);
|
||||
a(t.call("abc\uD834\uDF06def", 4), 0xdf06);
|
||||
a(t.call("abc\uD834\uDF06def", 5), 0x64);
|
||||
a(t.call("abc\uD834\uDF06def", 42), undefined);
|
||||
a(t.call("abc\uD834\uDF06def", Infinity), undefined);
|
||||
a(t.call("abc\uD834\uDF06def", Infinity), undefined);
|
||||
a(t.call("abc\uD834\uDF06def", NaN), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def", false), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def", null), 0x61);
|
||||
a(t.call("abc\uD834\uDF06def", undefined), 0x61);
|
||||
|
||||
// String that starts with an astral symbol
|
||||
a(t.call("\uD834\uDF06def", ""), 0x1d306);
|
||||
a(t.call("\uD834\uDF06def", "1"), 0xdf06);
|
||||
a(t.call("\uD834\uDF06def", "_"), 0x1d306);
|
||||
a(t.call("\uD834\uDF06def"), 0x1d306);
|
||||
a(t.call("\uD834\uDF06def", -1), undefined);
|
||||
a(t.call("\uD834\uDF06def", -0), 0x1d306);
|
||||
a(t.call("\uD834\uDF06def", 0), 0x1d306);
|
||||
a(t.call("\uD834\uDF06def", 1), 0xdf06);
|
||||
a(t.call("\uD834\uDF06def", 42), undefined);
|
||||
a(t.call("\uD834\uDF06def", false), 0x1d306);
|
||||
a(t.call("\uD834\uDF06def", null), 0x1d306);
|
||||
a(t.call("\uD834\uDF06def", undefined), 0x1d306);
|
||||
|
||||
// Lone high surrogates
|
||||
a(t.call("\uD834abc", ""), 0xd834);
|
||||
a(t.call("\uD834abc", "_"), 0xd834);
|
||||
a(t.call("\uD834abc"), 0xd834);
|
||||
a(t.call("\uD834abc", -1), undefined);
|
||||
a(t.call("\uD834abc", -0), 0xd834);
|
||||
a(t.call("\uD834abc", 0), 0xd834);
|
||||
a(t.call("\uD834abc", false), 0xd834);
|
||||
a(t.call("\uD834abc", NaN), 0xd834);
|
||||
a(t.call("\uD834abc", null), 0xd834);
|
||||
a(t.call("\uD834abc", undefined), 0xd834);
|
||||
|
||||
// Lone low surrogates
|
||||
a(t.call("\uDF06abc", ""), 0xdf06);
|
||||
a(t.call("\uDF06abc", "_"), 0xdf06);
|
||||
a(t.call("\uDF06abc"), 0xdf06);
|
||||
a(t.call("\uDF06abc", -1), undefined);
|
||||
a(t.call("\uDF06abc", -0), 0xdf06);
|
||||
a(t.call("\uDF06abc", 0), 0xdf06);
|
||||
a(t.call("\uDF06abc", false), 0xdf06);
|
||||
a(t.call("\uDF06abc", NaN), 0xdf06);
|
||||
a(t.call("\uDF06abc", null), 0xdf06);
|
||||
a(t.call("\uDF06abc", undefined), 0xdf06);
|
||||
|
||||
a.throws(function () { t.call(undefined); }, TypeError);
|
||||
a.throws(function () { t.call(undefined, 4); }, TypeError);
|
||||
a.throws(function () { t.call(null); }, TypeError);
|
||||
a.throws(function () { t.call(null, 4); }, TypeError);
|
||||
a(t.call(42, 0), 0x34);
|
||||
a(t.call(42, 1), 0x32);
|
||||
a(t.call({ toString: function () { return "abc"; } }, 2), 0x63);
|
||||
|
||||
a.throws(function () { t.apply(undefined); }, TypeError);
|
||||
a.throws(function () { t.apply(undefined, [4]); }, TypeError);
|
||||
a.throws(function () { t.apply(null); }, TypeError);
|
||||
a.throws(function () { t.apply(null, [4]); }, TypeError);
|
||||
a(t.apply(42, [0]), 0x34);
|
||||
a(t.apply(42, [1]), 0x32);
|
||||
a(t.apply({ toString: function () { return "abc"; } }, [2]), 0x63);
|
||||
};
|
5
web/node_modules/es5-ext/test/string/#/contains/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/#/contains/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../../string/#/contains/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/#/contains/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/contains/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/#/contains/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/contains/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
14
web/node_modules/es5-ext/test/string/#/contains/shim.js
generated
vendored
Normal file
14
web/node_modules/es5-ext/test/string/#/contains/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("raz", ""), true, "Empty");
|
||||
a(t.call("", ""), true, "Both Empty");
|
||||
a(t.call("raz", "raz"), true, "Same");
|
||||
a(t.call("razdwa", "raz"), true, "Starts with");
|
||||
a(t.call("razdwa", "dwa"), true, "Ends with");
|
||||
a(t.call("razdwa", "zdw"), true, "In middle");
|
||||
a(t.call("", "raz"), false, "Something in empty");
|
||||
a(t.call("az", "raz"), false, "Longer");
|
||||
a(t.call("azasdfasdf", "azff"), false, "Not found");
|
||||
a(t.call("razdwa", "raz", 1), false, "Position");
|
||||
};
|
12
web/node_modules/es5-ext/test/string/#/count.js
generated
vendored
Normal file
12
web/node_modules/es5-ext/test/string/#/count.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a.throws(function () { t.call("", ""); });
|
||||
a(t.call("x", "x"), 1);
|
||||
a(t.call("xx", "x"), 2);
|
||||
a(t.call("xxx", "xx"), 1);
|
||||
a(t.call("xxxx", "xx"), 2);
|
||||
a(t.call("xx", "xxx"), 0);
|
||||
a(t.call("", "elo"), 0);
|
||||
a(t.call("fooo", "foofooo"), 0);
|
||||
};
|
5
web/node_modules/es5-ext/test/string/#/ends-with/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/#/ends-with/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../../string/#/ends-with/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/#/ends-with/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/ends-with/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
16
web/node_modules/es5-ext/test/string/#/ends-with/shim.js
generated
vendored
Normal file
16
web/node_modules/es5-ext/test/string/#/ends-with/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// In some parts copied from:
|
||||
// http://closure-library.googlecode.com/svn/trunk/closure/goog/
|
||||
// string/string_test.html
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("abc", ""), true, "Empty needle");
|
||||
a(t.call("abcd", "cd"), true, "Ends with needle");
|
||||
a(t.call("abcd", "abcd"), true, "Needle equals haystack");
|
||||
a(t.call("abcd", "ab"), false, "Doesn't end with needle");
|
||||
a(t.call("abc", "defg"), false, "Length trick");
|
||||
a(t.call("razdwa", "zd", 3), false, "Position: false");
|
||||
a(t.call("razdwa", "zd", 4), true, "Position: true");
|
||||
a(t.call("razdwa", "zd", 5), false, "Position: false #2");
|
||||
};
|
7
web/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa"), "razDwaTRzy4yRtr4Tiu45Pa");
|
||||
a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa-"), "razDwaTRzy4yRtr4Tiu45Pa-");
|
||||
a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa--"), "razDwaTRzy4yRtr4Tiu45Pa--");
|
||||
};
|
8
web/node_modules/es5-ext/test/string/#/indent.js
generated
vendored
Normal file
8
web/node_modules/es5-ext/test/string/#/indent.js
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("ra\nzz", ""), "ra\nzz", "Empty");
|
||||
a(t.call("ra\nzz", "\t", 3), "\t\t\tra\n\t\t\tzz", "String repeat");
|
||||
a(t.call("ra\nzz\nsss\nfff\n", "\t"), "\tra\n\tzz\n\tsss\n\tfff\n", "Multi-line");
|
||||
a(t.call("ra\n\nzz\n", "\t"), "\tra\n\n\tzz\n", "Don't touch empty lines");
|
||||
};
|
6
web/node_modules/es5-ext/test/string/#/last.js
generated
vendored
Normal file
6
web/node_modules/es5-ext/test/string/#/last.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call(""), null, "Null");
|
||||
a(t.call("abcdef"), "f", "String");
|
||||
};
|
3
web/node_modules/es5-ext/test/string/#/normalize/_data.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/normalize/_data.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t[0], "object"); };
|
5
web/node_modules/es5-ext/test/string/#/normalize/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/#/normalize/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../../string/#/normalize/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/#/normalize/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/normalize/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
13
web/node_modules/es5-ext/test/string/#/normalize/shim.js
generated
vendored
Normal file
13
web/node_modules/es5-ext/test/string/#/normalize/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Taken from: https://github.com/walling/unorm/blob/master/test/es6-shim.js
|
||||
|
||||
"use strict";
|
||||
|
||||
var str = "äiti";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call(str), "\u00e4iti");
|
||||
a(t.call(str, "NFC"), "\u00e4iti");
|
||||
a(t.call(str, "NFD"), "a\u0308iti");
|
||||
a(t.call(str, "NFKC"), "\u00e4iti");
|
||||
a(t.call(str, "NFKD"), "a\u0308iti");
|
||||
};
|
24
web/node_modules/es5-ext/test/string/#/pad.js
generated
vendored
Normal file
24
web/node_modules/es5-ext/test/string/#/pad.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
"use strict";
|
||||
|
||||
var partial = require("../../../function/#/partial");
|
||||
|
||||
module.exports = {
|
||||
Left: function (t, a) {
|
||||
t = partial.call(t, "x", 5);
|
||||
|
||||
a(t.call("yy"), "xxxyy");
|
||||
a(t.call(""), "xxxxx", "Empty string");
|
||||
|
||||
a(t.call("yyyyy"), "yyyyy", "Equal length");
|
||||
a(t.call("yyyyyyy"), "yyyyyyy", "Longer");
|
||||
},
|
||||
Right: function (t, a) {
|
||||
t = partial.call(t, "x", -5);
|
||||
|
||||
a(t.call("yy"), "yyxxx");
|
||||
a(t.call(""), "xxxxx", "Empty string");
|
||||
|
||||
a(t.call("yyyyy"), "yyyyy", "Equal length");
|
||||
a(t.call("yyyyyyy"), "yyyyyyy", "Longer");
|
||||
}
|
||||
};
|
10
web/node_modules/es5-ext/test/string/#/plain-replace-all.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/test/string/#/plain-replace-all.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("razdwatrzy", "dwa", "olera"), "razoleratrzy", "Basic");
|
||||
a(t.call("razdwatrzy", "dwa", "ole$&a"), "razole$&atrzy", "Inserts");
|
||||
a(t.call("razdwa", "ola", "sdfs"), "razdwa", "No replace");
|
||||
|
||||
a(t.call("$raz$$dwa$trzy$", "$", "&&"), "&&raz&&&&dwa&&trzy&&", "Multi");
|
||||
a(t.call("$raz$$dwa$$$$trzy$", "$$", "&"), "$raz&dwa&&trzy$", "Multi many chars");
|
||||
};
|
7
web/node_modules/es5-ext/test/string/#/plain-replace.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/test/string/#/plain-replace.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("razdwatrzy", "dwa", "olera"), "razoleratrzy", "Basic");
|
||||
a(t.call("razdwatrzy", "dwa", "ole$&a"), "razole$&atrzy", "Inserts");
|
||||
a(t.call("razdwa", "ola", "sdfs"), "razdwa", "No replace");
|
||||
};
|
5
web/node_modules/es5-ext/test/string/#/repeat/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/#/repeat/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../../string/#/repeat/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/#/repeat/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/repeat/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
12
web/node_modules/es5-ext/test/string/#/repeat/shim.js
generated
vendored
Normal file
12
web/node_modules/es5-ext/test/string/#/repeat/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("a", 0), "", "Empty");
|
||||
a(t.call("a", 1), "a", "1");
|
||||
a(t.call("a", 2), "aa", "2");
|
||||
a(t.call("\t", 5), "\t\t\t\t\t", "Whitespace");
|
||||
a(t.call("raz", 3), "razrazraz", "Many chars");
|
||||
a(t.call("raz", 3), "razrazraz", "Many chars");
|
||||
a(t.call("razfoobar", 5), "razfoobarrazfoobarrazfoobarrazfoobarrazfoobar", "Many chars");
|
||||
a(t.call("a", 300).length, 300);
|
||||
};
|
5
web/node_modules/es5-ext/test/string/#/starts-with/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/#/starts-with/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../../string/#/starts-with/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/#/starts-with/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/starts-with/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
14
web/node_modules/es5-ext/test/string/#/starts-with/shim.js
generated
vendored
Normal file
14
web/node_modules/es5-ext/test/string/#/starts-with/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Inspired and in some parts copied from:
|
||||
// http://closure-library.googlecode.com/svn/trunk/closure/goog
|
||||
// /string/string_test.html
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("abc", ""), true, "Empty needle");
|
||||
a(t.call("abcd", "ab"), true, "Starts with needle");
|
||||
a(t.call("abcd", "abcd"), true, "Needle equals haystack");
|
||||
a(t.call("abcd", "bcde", 1), false, "Needle larger than haystack");
|
||||
a(!t.call("abcd", "cd"), true, "Doesn't start with needle");
|
||||
a(t.call("abcd", "bc", 1), true, "Position");
|
||||
};
|
10
web/node_modules/es5-ext/test/string/#/uncapitalize.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/test/string/#/uncapitalize.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call("raz"), "raz", "Word");
|
||||
a(t.call("BLA"), "bLA", "Uppercase");
|
||||
a(t.call(""), "", "Empty");
|
||||
a(t.call("a"), "a", "One letter");
|
||||
a(t.call("this is a test"), "this is a test", "Sentence");
|
||||
a(t.call("This is a test"), "this is a test", "Capitalized sentence");
|
||||
};
|
6
web/node_modules/es5-ext/test/string/format-method.js
generated
vendored
Normal file
6
web/node_modules/es5-ext/test/string/format-method.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
t = t({ a: "A", aa: "B", ab: "C", b: "D", c: function () { return ++this.a; } });
|
||||
a(t.call({ a: 0 }, " %a%aab%abb%b\\%aa%ab%c%c "), " ABbCbD%aaC12 ");
|
||||
};
|
5
web/node_modules/es5-ext/test/string/from-code-point/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/from-code-point/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../string/from-code-point/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/from-code-point/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/from-code-point/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
47
web/node_modules/es5-ext/test/string/from-code-point/shim.js
generated
vendored
Normal file
47
web/node_modules/es5-ext/test/string/from-code-point/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master
|
||||
// /tests/tests.js
|
||||
|
||||
"use strict";
|
||||
|
||||
var pow = Math.pow;
|
||||
|
||||
module.exports = function (t, a) {
|
||||
var counter, result;
|
||||
|
||||
a(t.length, 1, "Length");
|
||||
a(String.propertyIsEnumerable("fromCodePoint"), false, "Not enumerable");
|
||||
|
||||
a(t(""), "\0", "Empty string");
|
||||
a(t(), "", "No arguments");
|
||||
a(t(-0), "\0", "-0");
|
||||
a(t(0), "\0", "0");
|
||||
a(t(0x1d306), "\uD834\uDF06", "Unicode");
|
||||
a(t(0x1d306, 0x61, 0x1d307), "\uD834\uDF06a\uD834\uDF07", "Complex unicode");
|
||||
a(t(0x61, 0x62, 0x1d307), "ab\uD834\uDF07", "Complex");
|
||||
a(t(false), "\0", "false");
|
||||
a(t(null), "\0", "null");
|
||||
|
||||
a.throws(function () { t("_"); }, RangeError, "_");
|
||||
a.throws(function () { t(Infinity); }, RangeError, "Infinity");
|
||||
a.throws(function () { t(-Infinity); }, RangeError, "-Infinity");
|
||||
a.throws(function () { t(-1); }, RangeError, "-1");
|
||||
a.throws(function () { t(0x10ffff + 1); }, RangeError, "Range error #1");
|
||||
a.throws(function () { t(3.14); }, RangeError, "Range error #2");
|
||||
a.throws(function () { t(3e-2); }, RangeError, "Range error #3");
|
||||
a.throws(function () { t(-Infinity); }, RangeError, "Range error #4");
|
||||
a.throws(function () { t(Number(Infinity)); }, RangeError, "Range error #5");
|
||||
a.throws(function () { t(NaN); }, RangeError, "Range error #6");
|
||||
a.throws(function () { t(undefined); }, RangeError, "Range error #7");
|
||||
a.throws(function () { t({}); }, RangeError, "Range error #8");
|
||||
a.throws(function () { t(/re/); }, RangeError, "Range error #9");
|
||||
|
||||
counter = (pow(2, 15) * 3) / 2;
|
||||
result = [];
|
||||
while (--counter >= 0) result.push(0); // One code unit per symbol
|
||||
t.apply(null, result); // Must not throw
|
||||
|
||||
counter = (pow(2, 15) * 3) / 2;
|
||||
result = [];
|
||||
while (--counter >= 0) result.push(0xffff + 1); // Two code units per symbol
|
||||
t.apply(null, result); // Must not throw
|
||||
};
|
11
web/node_modules/es5-ext/test/string/is-string.js
generated
vendored
Normal file
11
web/node_modules/es5-ext/test/string/is-string.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t(null), false, "Null");
|
||||
a(t(""), true, "Empty string");
|
||||
a(t(12), false, "Number");
|
||||
a(t(false), false, "Boolean");
|
||||
a(t(new Date()), false, "Date");
|
||||
a(t(new String("raz")), true, "String object");
|
||||
a(t("asdfaf"), true, "String");
|
||||
};
|
14
web/node_modules/es5-ext/test/string/random-uniq.js
generated
vendored
Normal file
14
web/node_modules/es5-ext/test/string/random-uniq.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/);
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(typeof t(), "string");
|
||||
a.ok(t().length > 7);
|
||||
a.not(t(), t());
|
||||
a.ok(isValidFormat(t()));
|
||||
a.ok(isValidFormat(t()));
|
||||
a.ok(isValidFormat(t()));
|
||||
a.ok(isValidFormat(t()));
|
||||
a.ok(isValidFormat(t()));
|
||||
};
|
13
web/node_modules/es5-ext/test/string/random.js
generated
vendored
Normal file
13
web/node_modules/es5-ext/test/string/random.js
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/);
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(typeof t(), "string");
|
||||
a.ok(t().length > 7);
|
||||
a.not(t({ isUnique: true }), t({ isUnique: true }));
|
||||
a.ok(isValidFormat(t()));
|
||||
a(t({ length: 1 }).length, 1);
|
||||
a(t({ length: 100 }).length, 100);
|
||||
a(t({ length: 0 }), "");
|
||||
};
|
5
web/node_modules/es5-ext/test/string/raw/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/raw/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../string/raw/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/raw/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/raw/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/raw/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/raw/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
14
web/node_modules/es5-ext/test/string/raw/shim.js
generated
vendored
Normal file
14
web/node_modules/es5-ext/test/string/raw/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Partially taken from:
|
||||
// https://github.com/paulmillr/es6-shim/blob/master/test/string.js
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
var callSite = [];
|
||||
|
||||
callSite.raw = ["The total is ", " ($", " with tax)"];
|
||||
a(t(callSite, "{total}", "{total * 1.01}"), "The total is {total} (${total * 1.01} with tax)");
|
||||
|
||||
callSite.raw = [];
|
||||
a(t(callSite, "{total}", "{total * 1.01}"), "");
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue