2.0.3 • Published 4 years ago

superstat v2.0.3

Weekly downloads
462
License
MIT
Repository
github
Last release
4 years ago

Superstat License NPM version Dependency Status Build Status Coverage 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
const stat = await superstat('./hello');

stat.isDirectory()
// returns
true

stat.isSymbolicLink()
// returns
true

License

MIT

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

5 years ago