initial commit

This commit is contained in:
air66
2019-07-24 18:16:32 +01:00
commit 5efebf4ded
8591 changed files with 899103 additions and 0 deletions

28
node_modules/memoizee/test/normalizers/primitive.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
/* eslint id-length: 0 */
"use strict";
var memoize = require("../..")
, join = Array.prototype.join;
module.exports = function (a) {
var i = 0
, fn = function () {
++i;
return join.call(arguments, "|");
}
, y = {
toString: function () {
return "foo";
}
}
, mfn;
mfn = memoize(fn, { primitive: true, length: false });
a(mfn(y, "bar", "zeta"), "foo|bar|zeta", "#1");
a(mfn("foo", "bar", "zeta"), "foo|bar|zeta", "#2");
a(i, 1, "Called once");
a(mfn(y, "bar"), "foo|bar", "#3");
a(i, 2, "Called twice");
a(mfn(y, "bar"), "foo|bar", "#4");
a(i, 2, "Called twice #2");
};