js/toyplus_wrap.js
/**
     * Stringifies an object
     * @param obj Object to be stringified
     * @return A stringified version of the object
     */
Stringifies an object
@param obj Object to be stringified
@return A stringified version of the object
Stringifies an object @param obj Object to be stringified @return A stringified version of the object
stringify( thing ){
        if( thing == null || typeof thing == 'number' || 
            typeof thing == 'boolean' ) return ""+thing
        if( typeof thing == 'string' ) return JSON.stringify(thing)
        if( thing.byteLength !== undefined ) 
            return BlobParser.STARTER + Base64.encode(thing)
        var txt 
        var comma=""
        if(Array.isArray(thing) ){
            txt = "["
            for( var i=0; i<thing.length; i++ ){
                txt += comma + JXON.stringify( thing[i] )
                comma = ','
            }    
            txt += ']'    
            return txt
        }
        txt = '{'
        comma=""
        for( var c in thing ){
            txt += comma + JXON.stringify(c) + ":" + JXON.stringify( thing[c] )
            comma = ','
        } 
        txt += '}'
        return txt
    }
stringify ( thing ) { if ( thing == null || typeof thing == 'number' || typeof thing == 'boolean' ) return "" + thing if ( typeof thing == 'string' ) return JSON . stringify ( thing ) if ( thing . byteLength !== undefined ) return BlobParser . STARTER + Base64 . encode ( thing ) var txt var comma = "" if ( Array . isArray ( thing ) ) { txt = "[" for ( var i = 0 ; i < thing . length ; i ++ ) { txt += comma + JXON . stringify ( thing [ i ] ) comma = ',' } txt += ']' return txt } txt = '{' comma = "" for ( var c in thing ) { txt += comma + JXON . stringify ( c ) + ":" + JXON . stringify ( thing [ c ] ) comma = ',' } txt += '}' return txt }
Stringifies an object
 @param obj Object to be stringified
 @return A stringified version of the object
Stringifies an object @param obj Object to be stringified @return A stringified version of the object