JSPM

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

Check if filepath exists and is a file

Package Exports

  • file-exists

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 (file-exists) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

file-exists

Check if filepath exists and is a file. Returns false for directories.

Install

npm install file-exists --save

Usage

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

console.log(fileExists('/index.html')) // OUTPUTS: true or false

Options

fileExists(filepath[, options])

  • filepath - the path to the file to check if it exists
  • options - an object of options
    • root - the root directory to look in (or cwd)

Run Tests

npm install
npm test