Skip to content

Latest commit

 

History

History
94 lines (47 loc) · 1.32 KB

File metadata and controls

94 lines (47 loc) · 1.32 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

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