@supercharge/json
Version:
Secure drop-in replacement for the global `JSON` object
15 lines (14 loc) • 564 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.stringify = void 0;
/**
* Converts a JavaScript value to a JSON string.
*
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer A function that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
function stringify(value, replacer, space) {
return JSON.stringify(value, replacer, space);
}
exports.stringify = stringify;