src/rate-limited-client.js
// Lookup a counter in the counter_cache, and it isn't present, initialize it.
Lookup a counter in the counter_cache, and it isn't present, initialize it.
Lookup a counter in the counter_cache and it isn ' t present initialize it .
function lookupCounter(client, project_key,counter_key) {
  client._counter_cache[project_key] = client._counter_cache[project_key] || {};
  client._counter_cache[project_key][counter_key] = client._counter_cache[project_key][counter_key] || {
    have : {
      from : 0,
      to : 0
    },
    need : 0,
    promise : null
  };
  return client._counter_cache[project_key][counter_key];
}
function lookupCounter ( client , project_key , counter_key ) { client . _counter_cache [ project_key ] = client . _counter_cache [ project_key ] || { } ; client . _counter_cache [ project_key ] [ counter_key ] = client . _counter_cache [ project_key ] [ counter_key ] || { have : { from : 0 , to : 0 } , need : 0 , promise : null } ; return client . _counter_cache [ project_key ] [ counter_key ] ; }
Lookup a counter in the counter_cache, and it isn't present, initialize it.
Lookup a counter in the counter_cache and it isn ' t present initialize it .