JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3948
  • Score
    100M100P100Q11760F
  • License MIT

Check if a file exists. A fs.exists implementation that is not deprecated.

Package Exports

  • exists-file

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (exists-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

exists-file

Last version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status Gratipay

Check if a file exists. A fs.exists implementation that is not deprecated.

Because fs.exist and fs.existsSync are deprecated this an implementation using fs.stats and fs.statsSync for get the same result.

Install

npm install exists-file --save

Usage

var existsFile = require('exists-file');

// Sync version

var exists = existsFile('./README.md');
console.log(exists) // => true;

// Async version

existsFileFile('./README.md', function(err, exists) {
    ...
});

License

MIT © Kiko Beats