Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

superstat

coderaiser535MIT2.0.3

smooth out differences between stat and lstat

stat, lstat, fstat

readme

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

changelog

2020.04.26, v2.0.3

fix:

  • (superstat) rm unused basename

2020.04.14, v2.0.2

fix:

  • (superstat) name has no sense

2020.04.14, v2.0.1

fix:

  • (superstat) add ability to return name

2020.04.14, v2.0.0

feature:

  • (superstat) drop support of node < 10
  • (package) nyc v15.0.1
  • (package) nodemon v2.0.3
  • (package) eslint-plugin-putout v3.5.0
  • (package) eslint-plugin-node v11.1.0
  • (package) try-to-catch v3.0.0
  • (package) eslint v6.8.0
  • (package) putout v7.22.0
  • (package) madrun v5.4.5