UNPKG

fs-nextra

Version:

Node.js fs next-gen extra (nextra) methods.

23 lines (22 loc) 1.06 kB
import { JsonOptions } from './writeJSON'; /** * Writes a json file to disk, creating all directories needed to meet the filepath provided. * @function outputJson * @memberof fsn/nextra * @param file The path to the file you want to create * @param data The data to write to file * @param options The write options or the encoding string. * @param atomic If the operation should be done atomically */ /** * Writes a json file to disk, creating all directories needed to meet the filepath provided. * @function outputJSON * @memberof fsn/nextra * @param file The path to the file you want to create * @param data The data to write to file * @param options The write options or the encoding string. * @param atomic If the operation should be done atomically */ export declare function outputJSON(file: string, data: any, atomic?: boolean): Promise<void>; export declare function outputJSON(file: string, data: any, options?: JsonOptions, atomic?: boolean): Promise<void>; export declare const outputJson: typeof outputJSON;