Skip to content

nathan7/sync-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sync-fs

Synchronous version of the node.js fs module. Replaces the functions that take result callbacks with synchronous ones. Intended as the complement to then-fs for using with Concur.sync.

Installation

$ npm install sync-fs 

API

The API for sync-fs is like that of then-fs module except that any function which normally returns a promise is synchronous instead.

Example:

function readJSON(path) {
  return JSON.parse(fs.readFile(path, 'utf8'))
}
console.dir(readJSON(__dirname + '/package.json'))

License

MIT

About

Synchronous version of the node.js fs module.

Resources

Stars

Watchers

Forks

Packages

No packages published