superstat

2.0.3 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.3
    536
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.3
    536
  • 2.0.2
    2
  • 2.0.1
    3
  • 2.0.0
    2
  • 1.0.0
    9

Package Sidebar

Install

npm i superstat

Weekly Downloads

153

Version

2.0.3

License

MIT

Unpacked Size

5.33 kB

Total Files

5

Last publish

Collaborators

  • coderaiser