UNPKG

jsonfile-stable

Version:

Write json file in stable format

26 lines (21 loc) 420 B
# Write JSON in Stable Format ## writeFileSync ```js import jsonfileStable from "jsonfile-stable"; const oJson = { b: 1, a: 1 } jsonfileStable.writeFileSync('test.json', oJson); // output { a: 1, b: 1 } ``` ## readFileSync Unnessessery, but keep same interface as jsonfile. ```js import jsonfileStable from "jsonfile-stable"; const oJson = jsonfileStable.readFileSync('test.json'); ```