Skip to content

Synchronously check if a path exists and returns its stats object if it does

Notifications You must be signed in to change notification settings

trentmwillis/exists-stat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exists-stat

Synchronously check if a path exists and returns its stats object if it does. Saves you from needing try-catch statements when trying to get stats information.

existsStat('exists-dir').isDirectory(); // true
existsStat('exists.js').isFile();       //true

existsStat('does-not-exist-dir'); // null
existsStat('does-not-exist.js');  // null

About

Synchronously check if a path exists and returns its stats object if it does

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published