MCPcopy
hub / github.com/lodash/lodash / createCaches

Function createCaches

test/test.js:1053–1068  ·  view source on GitHub ↗
(pairs)

Source from the content-addressed store, hash-verified

1051 });
1052
1053 function createCaches(pairs) {
1054 var largeStack = new mapCaches.Stack(pairs),
1055 length = pairs ? pairs.length : 0;
1056
1057 lodashStable.times(LARGE_ARRAY_SIZE - length, function() {
1058 largeStack.set({}, {});
1059 });
1060
1061 return {
1062 'hashes': new mapCaches.Hash(pairs),
1063 'list caches': new mapCaches.ListCache(pairs),
1064 'map caches': new mapCaches.MapCache(pairs),
1065 'stack caches': new mapCaches.Stack(pairs),
1066 'large stacks': largeStack
1067 };
1068 }
1069
1070 lodashStable.forOwn(createCaches(pairs), function(cache, kind) {
1071 var isLarge = /^large/.test(kind);

Callers 1

test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected