json-statham
Kick your JSON's ass, with json-statham's help. Extends Homefront.
Makes working with javascript objects and json easy.
Installation
npm i --save json-statham
Tests
npm test
Usage
This module extends Homefront. It's essentially the same, except for some additional methods, and an extended constructor.
Using Statham
All arguments are optional.
let Statham = Statham;let statham = data: 'here' StathamMODE_NESTED 'path/to/file';
Using .setFileLocation()
let Statham = Statham;let statham = ; statham; // Used by .save()
Using .save()
let Statham = Statham;let statham = ; statham;statham; // Specific filestatham; // Create path for file, toostatham; // Both options
Using .fromFile(fileName[, ensureFileExists=false])
This method allows you to tell Statham to fetch the contents of a file itself. When ensure
has been set to true, statham will create the provided file if it doesn't exist yet. This method returns a promise, and resolves with a statham instance (as described above).
let Statham = Statham; Statham;