Home > @rushstack/node-core-library > JsonFile > save
JsonFile.save() method
Saves the file to disk. Returns false if nothing was written due to options.onlyIfChanged.
Signature:
static save(jsonObject: JsonObject, jsonFilename: string, options?: IJsonFileSaveOptions): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
jsonObject | JsonObject | the object to be saved |
jsonFilename | string | the file path to write |
options | IJsonFileSaveOptions | (Optional) other settings that control how the file is saved |
Returns:
boolean
false if ISaveJsonFileOptions.onlyIfChanged didn't save anything; true otherwise