Sha256: 02e45c5e12288193d3d83404bded4e11511ff011b576fdf8dfcb88d265c0a94f

Contents?: true

Size: 861 Bytes

Versions: 26

Compression:

Stored size: 861 Bytes

Contents

var listCacheClear = require('./_listCacheClear'),
    listCacheDelete = require('./_listCacheDelete'),
    listCacheGet = require('./_listCacheGet'),
    listCacheHas = require('./_listCacheHas'),
    listCacheSet = require('./_listCacheSet');

/**
 * Creates an list cache object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function ListCache(entries) {
  var index = -1,
      length = entries ? entries.length : 0;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;

module.exports = ListCache;

Version data entries

26 entries across 5 versions & 3 rubygems

Version Path
babel-schmooze-sprockets-0.1.1 node_modules/babel-register/node_modules/lodash/_ListCache.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-template/node_modules/lodash/_ListCache.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-plugin-transform-es2015-function-name/node_modules/lodash/_ListCache.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-generator/node_modules/lodash/_ListCache.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-helper-call-delegate/node_modules/lodash/_ListCache.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-helper-define-map/node_modules/lodash/_ListCache.js