MCPcopy Create free account
hub / github.com/RubyLouvre/anu / fastKey

Function fastKey

test/babel.js:5399–5411  ·  view source on GitHub ↗
(it, create)

Source from the content-addressed store, hash-verified

5397 } });
5398 };
5399 var fastKey = function fastKey(it, create) {
5400 // return primitive with prefix
5401 if (!isObject(it)) return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
5402 if (!has(it, META)) {
5403 // can't set metadata to uncaught frozen object
5404 if (!isExtensible(it)) return 'F';
5405 // not necessary to add metadata
5406 if (!create) return 'E';
5407 // add missing metadata
5408 setMeta(it);
5409 // return object ID
5410 }return it[META].i;
5411 };
5412 var getWeak = function getWeak(it, create) {
5413 if (!has(it, META)) {
5414 // can't set metadata to uncaught frozen object

Callers 2

getEntryFunction · 0.85
babel.jsFile · 0.85

Calls 3

setMetaFunction · 0.85
isObjectFunction · 0.70
hasFunction · 0.70

Tested by

no test coverage detected