is-regular-file

Checks if a given path is a regular file

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
is-regular-file
301.1.15 years ago7 years agoMinified + gzip package size for is-regular-file in KB

Readme

is-regular-file
!NPM versionnpm-imagenpm-url !Downloadsdownloads-imagenpm-url !Build Statustravis-imagetravis-url !Coverage Statuscodecov-imagecodecov-url !Dependency statusdavid-dm-imagedavid-dm-url !Dev Dependency statusdavid-dm-dev-imagedavid-dm-dev-url !Greenkeeper badgegreenkeeper-imagegreenkeeper-url
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-cov to get coverage report

License

Released under the MIT License.