Apply class transform.

This commit is contained in:
John-David Dalton
2017-01-09 14:01:20 -08:00
parent c2208f82dc
commit 648722f1a6
5 changed files with 40 additions and 30 deletions

View File

@@ -10,13 +10,15 @@ import setCacheHas from './_setCacheHas.js';
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
let index = -1;
const length = values == null ? 0 : values.length;
class SetCache {
constructor(values) {
let index = -1;
const length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
}