MCPcopy Index your code
hub / github.com/codrops/RainEffect / fastKey

Function fastKey

demo/js/index2.js:225–237  ·  view source on GitHub ↗
(it, create)

Source from the content-addressed store, hash-verified

223 , id = 0;
224
225var fastKey = function(it, create){
226 // return primitive with prefix
227 if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
228 if(!$has(it, ID)){
229 // can't set id to frozen object
230 if(!isExtensible(it))return 'F';
231 // not necessary to add id
232 if(!create)return 'E';
233 // add missing object id
234 hide(it, ID, ++id);
235 // return object id with prefix
236 } return 'O' + it[ID];
237};
238
239var getEntry = function(that, key){
240 // fast case

Callers 2

getEntryFunction · 0.70
index2.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected