Skip to content

Repository files navigation

Superstat LicenseNPM versionDependency StatusBuild StatusCoverage Status

Smooth out differences between stat and lstat.

Why?

  • Symbolic link stat returned by lstat.isDirectory() is always false.
  • To know if a link is a directory we should call stat.isDirectory().
  • stat.isSymbolicLink()is always false.

Install

npm i superstat

Example

Create symlink to root directory:

ln -s / hello
conststat=awaitsuperstat('./hello');stat.isDirectory()// returnstruestat.isSymbolicLink()// returnstrue

License

MIT

About

Smooth out differences between stat and lstat

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages