stub out yson test prod?

This commit is contained in:
Mark Nadal 2020-09-19 19:01:26 -07:00
parent 9d25eb9f2d
commit bcf6e90a2f

View File

@ -4,6 +4,7 @@
var yson = {}, u, sI = setTimeout.turn || (typeof setImmediate != ''+u && setImmediate) || setTimeout;
yson.parseAsync = function(text, done, revive, M){
try{done(u, JSON.parse(text, revive))}catch(e){console.log('%',e);done(e)}return;
//console.log("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
if('string' != typeof text){ try{ done(u,JSON.parse(text)) }catch(e){ done(e) } return }
var ctx = {i: 0, text: text, done: done, l: text.length, up: []};
@ -158,6 +159,7 @@ function value(s){
}
yson.stringifyAsync = function(data, done, replacer, space, ctx){
try{done(u, JSON.stringify(data, replacer, space))}catch(e){console.log('%%',e);done(e)}return;
//console.log("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
ctx = ctx || {};
ctx.text = ctx.text || "";