Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

springbokjs-utils

2.0.1 • Public • Published

springbokjs-utils NPM version Build Status Coverage

See the full API here.

fs with Promises

var fs = require('springbokjs-utils/fs');
 
fs.readFile('./myfile')
    .then(function(contentBuffer) {
        console.log('success ', contentBuffer.toString());
    })
    .catch(function(error) {
        console.error('error', error);
    });
 
Promise.all([
    fs.readFile('./myFirstFile'),
    fs.readFile('./mySecondFile')
]).then(function(contents) {
    console.log('myFirstFile content', contents[0].toString());
    console.log('mySecondFile content', contents[1].toString());
});
 

install

npm i springbokjs-utils

Downloadsweekly downloads

47

version

2.0.1

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability