sourav-das/stem-separator
3
1declare type StringifyOptions = {2 /**3 * A function that alters the behavior of the stringification process, or an4 * array of String and Number objects that serve as a allowlist for5 * selecting/filtering the properties of the value object to be included in6 * the JSON5 string. If this value is null or not provided, all properties7 * of the object are included in the resulting JSON5 string.8 */9 replacer?:10 | ((this: any, key: string, value: any) => any)11 | (string | number)[]12 | null13 14 /**15 * A String or Number object that's used to insert white space into the16 * output JSON5 string for readability purposes. If this is a Number, it17 * indicates the number of space characters to use as white space; this18 * number is capped at 10 (if it is greater, the value is just 10). Values19 * less than 1 indicate that no space should be used. If this is a String,20 * the string (or the first 10 characters of the string, if it's longer than21 * that) is used as white space. If this parameter is not provided (or is22 * null), no white space is used. If white space is used, trailing commas23 * will be used in objects and arrays.24 */25 space?: string | number | null26 27 /**28 * A String representing the quote character to use when serializing29 * strings.30 */31 quote?: string | null32}33 34/**35 * Converts a JavaScript value to a JSON5 string.36 * @param value The value to convert to a JSON5 string.37 * @param replacer A function that alters the behavior of the stringification38 * process. If this value is null or not provided, all properties of the object39 * are included in the resulting JSON5 string.40 * @param space A String or Number object that's used to insert white space into41 * the output JSON5 string for readability purposes. If this is a Number, it42 * indicates the number of space characters to use as white space; this number43 * is capped at 10 (if it is greater, the value is just 10). Values less than 144 * indicate that no space should be used. If this is a String, the string (or45 * the first 10 characters of the string, if it's longer than that) is used as46 * white space. If this parameter is not provided (or is null), no white space47 * is used. If white space is used, trailing commas will be used in objects and48 * arrays.49 * @returns The JSON5 string converted from the JavaScript value.50 */51declare function stringify(52 value: any,53 replacer?: ((this: any, key: string, value: any) => any) | null,54 space?: string | number | null,55): string56 57/**58 * Converts a JavaScript value to a JSON5 string.59 * @param value The value to convert to a JSON5 string.60 * @param replacer An array of String and Number objects that serve as a61 * allowlist for selecting/filtering the properties of the value object to be62 * included in the JSON5 string. If this value is null or not provided, all63 * properties of the object are included in the resulting JSON5 string.64 * @param space A String or Number object that's used to insert white space into65 * the output JSON5 string for readability purposes. If this is a Number, it66 * indicates the number of space characters to use as white space; this number67 * is capped at 10 (if it is greater, the value is just 10). Values less than 168 * indicate that no space should be used. If this is a String, the string (or69 * the first 10 characters of the string, if it's longer than that) is used as70 * white space. If this parameter is not provided (or is null), no white space71 * is used. If white space is used, trailing commas will be used in objects and72 * arrays.73 * @returns The JSON5 string converted from the JavaScript value.74 */75declare function stringify(76 value: any,77 replacer: (string | number)[],78 space?: string | number | null,79): string80 81/**82 * Converts a JavaScript value to a JSON5 string.83 * @param value The value to convert to a JSON5 string.84 * @param options An object specifying options.85 * @returns The JSON5 string converted from the JavaScript value.86 */87declare function stringify(value: any, options: StringifyOptions): string88 89export = stringify90 