Checks if a path is a regular file
JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.editorconfig
.eslintignore
.eslintrc.json
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

is-regular-file

NPM version Downloads Build Status Coverage Status Dependency status Dev Dependency status Greenkeeper badge

Checks if a path is a regular file.

Installation

$ npm install is-regular-file

Usage

const isRegularFile = require('is-regular-file');

isRegularFile('path/to/file')
.then((is) => console.log('Is regular file:', is));

or if you prefer sync:

const isRegularFileSync = require('is-regular-file').sync;

console.log('Is regular file:', isRegularFileSync('path/to/file'));

Tests

$ npm test
$ npm test -- --watch during development

License

Released under the MIT License.