File utils
var lsFs = require('ls-fs');
lsFs.readJson('settings.json').then(function(settings) {
console.log(settings.prop1);
console.log(settings.prop2);
});
lsFs.readJson(path, [opts]).then(function(parsedJsonObj) {
console.log(parsedJsonObj);
});
path
(String) The path to the JSON file to read
lsFs.writeJson(path, obj, [opts]).then(function(pathToJson) {
});
path
(String) The path to the JSON file to writeobj
(*) The thing to JSON.stringify
lsFs.tmpDir([opts]).then(function(pathToTmpDir) {
// do stuff with my temporary directory
});
[opts]
(Object) Same as https://github.com/raszi/node-tmp#directory-creation