mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-02 22:22:19 +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
10
web/node_modules/es5-ext/test/function/#/compose.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/test/function/#/compose.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
var f = function (a, b) { return ["a", arguments.length, a, b]; }
|
||||
, g = function (a) { return ["b", arguments.length].concat(a); }
|
||||
, h = function (a) { return ["c", arguments.length].concat(a); };
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a.deep(t.call(h, g, f)(1, 2), ["c", 1, "b", 1, "a", 2, 1, 2]);
|
||||
a.deep(t(h, g, f)(1, 2), ["c", 1, "b", 1, "a", 2, 1, 2]);
|
||||
};
|
20
web/node_modules/es5-ext/test/function/#/copy.js
generated
vendored
Normal file
20
web/node_modules/es5-ext/test/function/#/copy.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
var foo = "raz", bar = "dwa";
|
||||
// eslint-disable-next-line func-names
|
||||
var fn = function marko(a, b) { return this + a + b + foo + bar; };
|
||||
var result, o = {};
|
||||
|
||||
fn.prototype = o;
|
||||
|
||||
fn.foo = "raz";
|
||||
|
||||
result = t.call(fn);
|
||||
|
||||
a(result.length, fn.length, "Length");
|
||||
a(result.name, fn.name, "Length");
|
||||
a(result.call("marko", "el", "fe"), "markoelferazdwa", "Body");
|
||||
a(result.prototype, fn.prototype, "Prototype");
|
||||
a(result.foo, fn.foo, "Custom property");
|
||||
};
|
17
web/node_modules/es5-ext/test/function/#/curry.js
generated
vendored
Normal file
17
web/node_modules/es5-ext/test/function/#/curry.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
"use strict";
|
||||
|
||||
var toArray = require("../../../array/to-array")
|
||||
, f = function () { return toArray(arguments); };
|
||||
|
||||
module.exports = function (t, a) {
|
||||
var x, y = {}, z;
|
||||
a.deep(t.call(f, 0, 1, 2)(3), [], "0 arguments");
|
||||
x = t.call(f, 5, {});
|
||||
a(x.length, 5, "Length #1");
|
||||
z = x(1, 2);
|
||||
a(z.length, 3, "Length #2");
|
||||
z = z(3, 4);
|
||||
a(z.length, 1, "Length #1");
|
||||
a.deep(z(5, 6), [1, 2, 3, 4, 5], "Many arguments");
|
||||
a.deep(x(8, 3)(y, 45)("raz", 6), [8, 3, y, 45, "raz"], "Many arguments #2");
|
||||
};
|
5
web/node_modules/es5-ext/test/function/#/lock.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/function/#/lock.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call(function () { return arguments.length; })(1, 2, 3), 0);
|
||||
};
|
22
web/node_modules/es5-ext/test/function/#/microtask-delay.js
generated
vendored
Normal file
22
web/node_modules/es5-ext/test/function/#/microtask-delay.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
"use strict";
|
||||
|
||||
var nextTick = require("next-tick");
|
||||
|
||||
module.exports = function (t, a, d) {
|
||||
var wasInvoked = false, args = [{}, {}], context = {};
|
||||
var target = t.call(function () {
|
||||
a(this, context);
|
||||
a.deep(arguments, args);
|
||||
wasInvoked = true;
|
||||
});
|
||||
|
||||
nextTick(function () {
|
||||
a(wasInvoked, false);
|
||||
target.apply(context, args);
|
||||
a(wasInvoked, false);
|
||||
nextTick(function () {
|
||||
a(wasInvoked, true);
|
||||
d();
|
||||
});
|
||||
});
|
||||
};
|
11
web/node_modules/es5-ext/test/function/#/not.js
generated
vendored
Normal file
11
web/node_modules/es5-ext/test/function/#/not.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
var identity = require("../../../function/identity")
|
||||
, noop = require("../../../function/noop");
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t.call(identity)(""), true, "Falsy");
|
||||
a(t.call(noop)(), true, "Undefined");
|
||||
a(t.call(identity)({}), false, "Any object");
|
||||
a(t.call(identity)(true), false, "True");
|
||||
};
|
6
web/node_modules/es5-ext/test/function/#/partial.js
generated
vendored
Normal file
6
web/node_modules/es5-ext/test/function/#/partial.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
var toArray = require("../../../array/to-array")
|
||||
, f = function () { return toArray(arguments); };
|
||||
|
||||
module.exports = function (t, a) { a.deep(t.call(f, 1)(2, 3), [1, 2, 3]); };
|
5
web/node_modules/es5-ext/test/function/#/spread.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/function/#/spread.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var f = function (a, b) { return this[a] + this[b]; }, o = { a: 3, b: 4 };
|
||||
|
||||
module.exports = function (t, a) { a(t.call(f).call(o, ["a", "b"]), 7); };
|
26
web/node_modules/es5-ext/test/function/#/to-string-tokens.js
generated
vendored
Normal file
26
web/node_modules/es5-ext/test/function/#/to-string-tokens.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* eslint no-eval: "off" */
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a.deep(t.call(function (a, b) { return this[a] + this[b]; }), {
|
||||
args: "a, b",
|
||||
body: " return this[a] + this[b]; "
|
||||
});
|
||||
a.deep(t.call(function () {}), { args: "", body: "" });
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
a.deep(t.call(function (raz) {}), { args: "raz", body: "" });
|
||||
a.deep(t.call(function () { Object(); }), { args: "", body: " Object(); " });
|
||||
|
||||
try {
|
||||
eval("(() => {})");
|
||||
} catch (e) {
|
||||
// Non ES2015 env
|
||||
return;
|
||||
}
|
||||
|
||||
a.deep(t.call(eval("(() => {})")), { args: "", body: "" });
|
||||
a.deep(t.call(eval("((elo) => foo)")), { args: "elo", body: "foo" });
|
||||
a.deep(t.call(eval("(elo => foo)")), { args: "elo", body: "foo" });
|
||||
a.deep(t.call(eval("((elo, bar) => foo())")), { args: "elo, bar", body: "foo()" });
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue