mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
5
node_modules/es5-ext/test/string/#/@@iterator/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/#/@@iterator/index.js
generated
vendored
Normal file
3
node_modules/es5-ext/test/string/#/@@iterator/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./shim');
|
||||
3
node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/@@iterator/shim.js
generated
vendored
Normal file
9
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
node_modules/es5-ext/test/string/#/at.js
generated
vendored
Normal file
97
node_modules/es5-ext/test/string/#/at.js
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
// 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', +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', +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', +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', +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");
|
||||
};
|
||||
5
node_modules/es5-ext/test/string/#/camel-to-hyphen.js
generated
vendored
Normal file
5
node_modules/es5-ext/test/string/#/camel-to-hyphen.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call('razDwaTRzy4yFoo45My'), 'raz-dwa-t-rzy4y-foo45-my');
|
||||
};
|
||||
9
node_modules/es5-ext/test/string/#/capitalize.js
generated
vendored
Normal file
9
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
node_modules/es5-ext/test/string/#/case-insensitive-compare.js
generated
vendored
Normal file
7
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");
|
||||
};
|
||||
6
node_modules/es5-ext/test/string/#/code-point-at/implement.js
generated
vendored
Normal file
6
node_modules/es5-ext/test/string/#/code-point-at/implement.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var isImplemented =
|
||||
require('../../../../string/#/code-point-at/is-implemented');
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
||||
3
node_modules/es5-ext/test/string/#/code-point-at/index.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
generated
vendored
Normal file
3
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'); };
|
||||
81
node_modules/es5-ext/test/string/#/code-point-at/shim.js
generated
vendored
Normal file
81
node_modules/es5-ext/test/string/#/code-point-at/shim.js
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
// 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
node_modules/es5-ext/test/string/#/contains/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/#/contains/index.js
generated
vendored
Normal file
3
node_modules/es5-ext/test/string/#/contains/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./shim');
|
||||
3
node_modules/es5-ext/test/string/#/contains/is-implemented.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/contains/shim.js
generated
vendored
Normal file
14
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");
|
||||
};
|
||||
5
node_modules/es5-ext/test/string/#/ends-with/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/#/ends-with/index.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/ends-with/shim.js
generated
vendored
Normal file
16
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");
|
||||
};
|
||||
5
node_modules/es5-ext/test/string/#/hyphen-to-camel.js
generated
vendored
Normal file
5
node_modules/es5-ext/test/string/#/hyphen-to-camel.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa'), 'razDwaTRzy4yRtr4Tiu45Pa');
|
||||
};
|
||||
9
node_modules/es5-ext/test/string/#/indent.js
generated
vendored
Normal file
9
node_modules/es5-ext/test/string/#/indent.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
'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
node_modules/es5-ext/test/string/#/last.js
generated
vendored
Normal file
6
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
node_modules/es5-ext/test/string/#/normalize/_data.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/normalize/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/#/normalize/index.js
generated
vendored
Normal file
3
node_modules/es5-ext/test/string/#/normalize/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./shim');
|
||||
3
node_modules/es5-ext/test/string/#/normalize/is-implemented.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/normalize/shim.js
generated
vendored
Normal file
13
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
node_modules/es5-ext/test/string/#/pad.js
generated
vendored
Normal file
24
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');
|
||||
}
|
||||
};
|
||||
11
node_modules/es5-ext/test/string/#/plain-replace-all.js
generated
vendored
Normal file
11
node_modules/es5-ext/test/string/#/plain-replace-all.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
'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
node_modules/es5-ext/test/string/#/plain-replace.js
generated
vendored
Normal file
7
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
node_modules/es5-ext/test/string/#/repeat/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/#/repeat/index.js
generated
vendored
Normal file
3
node_modules/es5-ext/test/string/#/repeat/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./shim');
|
||||
3
node_modules/es5-ext/test/string/#/repeat/is-implemented.js
generated
vendored
Normal file
3
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'); };
|
||||
8
node_modules/es5-ext/test/string/#/repeat/shim.js
generated
vendored
Normal file
8
node_modules/es5-ext/test/string/#/repeat/shim.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call('a', 0), '', "Empty");
|
||||
a(t.call('a', 1), 'a', "1");
|
||||
a(t.call('\t', 5), '\t\t\t\t\t', "Whitespace");
|
||||
a(t.call('raz', 3), 'razrazraz', "Many chars");
|
||||
};
|
||||
5
node_modules/es5-ext/test/string/#/starts-with/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/#/starts-with/index.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/#/starts-with/shim.js
generated
vendored
Normal file
14
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
node_modules/es5-ext/test/string/#/uncapitalize.js
generated
vendored
Normal file
10
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");
|
||||
};
|
||||
7
node_modules/es5-ext/test/string/format-method.js
generated
vendored
Normal file
7
node_modules/es5-ext/test/string/format-method.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'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
node_modules/es5-ext/test/string/from-code-point/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/from-code-point/index.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/from-code-point/is-implemented.js
generated
vendored
Normal file
3
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
node_modules/es5-ext/test/string/from-code-point/shim.js
generated
vendored
Normal file
47
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(+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
node_modules/es5-ext/test/string/is-string.js
generated
vendored
Normal file
11
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
node_modules/es5-ext/test/string/random-uniq.js
generated
vendored
Normal file
14
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()));
|
||||
};
|
||||
5
node_modules/es5-ext/test/string/raw/implement.js
generated
vendored
Normal file
5
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
node_modules/es5-ext/test/string/raw/index.js
generated
vendored
Normal file
3
node_modules/es5-ext/test/string/raw/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./shim');
|
||||
3
node_modules/es5-ext/test/string/raw/is-implemented.js
generated
vendored
Normal file
3
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'); };
|
||||
15
node_modules/es5-ext/test/string/raw/shim.js
generated
vendored
Normal file
15
node_modules/es5-ext/test/string/raw/shim.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// 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}'), '');
|
||||
};
|
||||
Reference in New Issue
Block a user