1.1.1 • Published 4 years ago

@smileweb/fspromise v1.1.1

Weekly downloads
8
License
ISC
Repository
-
Last release
4 years ago

FsPromise

FsPromise is a FS library that use promises.

Example read(path)

const fsPromise = require('@smileweb/fspromise')
let file = __dirname+'/refOrder.json';
fsPromise.read(file).then(function(data){
   var dataJson = JSON.parse(data);
   console.log(dataJson.serviceItems);
})

The variable 'file' is the PATH or URL of the file as you need.

Example write(path,data)

const fsPromise = require('@smileweb/fspromise');
let file = __dirname+'/conf.json';
let data = 'Hello World !';
fsPromise.write(file,data)
.then((response)=>{
   console.log(`Response: ${response}`);
});
1.1.1

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago