writeJsonSync
Writes a JavaScript object to a JSON file.
Import:
import { writeJsonSync } from '@mnaoumov/typescript-dev-toolkit/json';Signature:
function writeJsonSync(path: string, data: unknown): voidParameters:
| Parameter | Type | Description |
|---|---|---|
path |
string | The path to the JSON file. |
data |
unknown | The data to write to the JSON file. |
Returns: void