• This project
    • Loading...
  • Sign in

POC / webcabin_wcdocker

Imgpsh fullsize
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • webcabin_wcdocker
  • bower_components
  • lodash-compat
  • internal
  • cachePush.js
  • Sujeet Kumar's avatar
    initial commit · 43a4a9d4
    43a4a9d4
    Sujeet Kumar authored 2017-10-04 17:45:40 +0530
cachePush.js 413 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
define(['../lang/isObject'], function(isObject) {

  /**
   * Adds `value` to the cache.
   *
   * @private
   * @name push
   * @memberOf SetCache
   * @param {*} value The value to cache.
   */
  function cachePush(value) {
    var data = this.data;
    if (typeof value == 'string' || isObject(value)) {
      data.set.add(value);
    } else {
      data.hash[value] = true;
    }
  }

  return cachePush;
});