MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / SetCache

Function SetCache

lib/web/jshint.js:2776–2783  ·  view source on GitHub ↗

* * Creates a cache object to store unique values. * * @private * @param {Array} [values] The values to cache.

(values)

Source from the content-addressed store, hash-verified

2774 * @param {Array} [values] The values to cache.
2775 */
2776 function SetCache(values) {
2777 var length = values ? values.length : 0;
2778
2779 this.data = { 'hash': nativeCreate(null), 'set': new Set };
2780 while (length--) {
2781 this.push(values[length]);
2782 }
2783 }
2784
2785 /**
2786 * Checks if `value` is in `cache` mimicking the return signature of

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected