1.0.5 • Published 9 years ago

babel-fs v1.0.5

Weekly downloads
8
License
MIT
Repository
github
Last release
9 years ago

babel-fs

Implement nodejs fs module with babel on promise style.

Usage

import bfs from './babel-fs';

const SELF = process.argv[1];

// call the readFileSync
var selfContent = bfs.readFileSync(SELF);

// call the readFile mehtod with promsie style
bfs.readFile(SELF).then(data => {
  console.log(selfContent + '' === data + ''); // true
  // done
  console.log(data);
}, error => {
  // fail
  console.error(error);
});