MCPcopy Create free account
hub / github.com/codrops/RainEffect / $stringify

Function $stringify

demo/js/index3.js:3472–3486  ·  view source on GitHub ↗
(it)

Source from the content-addressed store, hash-verified

3470 return result;
3471};
3472var $stringify = function stringify(it){
3473 var args = [it]
3474 , i = 1
3475 , $$ = arguments
3476 , replacer, $replacer;
3477 while($$.length > i)args.push($$[i++]);
3478 replacer = args[1];
3479 if(typeof replacer == 'function')$replacer = replacer;
3480 if($replacer || !isArray(replacer))replacer = function(key, value){
3481 if($replacer)value = $replacer.call(this, key, value);
3482 if(!isSymbol(value))return value;
3483 };
3484 args[1] = replacer;
3485 return _stringify.apply($JSON, args);
3486};
3487var buggyJSON = $fails(function(){
3488 var S = $Symbol();
3489 // MS Edge converts symbol values to JSON as {}

Callers

nothing calls this directly

Calls 1

isSymbolFunction · 0.70

Tested by

no test coverage detected