dist/modules/to.js
function toJSON(obj, pretty, def) {
    if (is_1.isString(pretty)) {
        def = pretty;
        pretty = undefined;
    }
    var tabs = 0;
    pretty = is_1.isBoolean(pretty) ? 2 : pretty;
    tabs = pretty ? pretty : tabs;
    if (!is_1.isObject(obj))
        return toDefault(null, def);
    return function_1.tryWrap(JSON.stringify, obj, null, tabs)(def);
}
function toJSON(obj, pretty, def) {
    if (is_1.isString(pretty)) {
        def = pretty;
        pretty = undefined;
    }
    var tabs = 0;
    pretty = is_1.isBoolean(pretty) ? 2 : pretty;
    tabs = pretty ? pretty : tabs;
    if (!is_1.isObject(obj))
        return toDefault(null, def);
    return function_1.tryWrap(JSON.stringify, obj, null, tabs)(def);
}
function toJSON ( obj , pretty , def ) { if ( is_1 . isString ( pretty ) ) { def = pretty ; pretty = undefined ; } var tabs = 0 ; pretty = is_1 . isBoolean ( pretty ) ? 2 : pretty ; tabs = pretty ? pretty : tabs ; if ( ! is_1 . isObject ( obj ) ) return toDefault ( null , def ) ; return function_1 . tryWrap ( JSON . stringify , obj , null , tabs ) ( def ) ; }
To JSON
Simple wrapper to strinigy using JSON.

@param obj the object to be stringified.
@param pretty an integer or true for tabs in JSON.
@param def optional default value on null.
To JSON Simple wrapper to strinigy using JSON .