Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 13, 2024 via pnpm

fs.realpath 1.0.0

Use node's fs.realpath, but fall back to the JS implementation if the native one fails
Package summary
Share
0
issues
1
license
1
ISC
Package created
15 Jun 2016
Version published
15 Jun 2016
Maintainers
1
Total deps
1
Direct deps
0
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
fs.realpath@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of fs.realpath 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does fs.realpath do?

The 'fs.realpath' is a backwards-compatible npm package that allows for the use of Node's fs.realpath with an added advantage of falling back to its built-in JavaScript implementation if the native one fails. This ability to handle both increases its resilience, especially noteworthy when dealing with slow or excessively symlink-looping paths which can raise new and platform-specific errors. It is particularly beneficial when wondering how to use fs.realpath in Node versions prior to v6.

How do you use fs.realpath?

The usage of 'fs.realpath' is quite straightforward. You begin by requiring the 'fs.realpath' as depicted below:

var rp = require('fs.realpath')

To use the async version, use the following method:

rp.realpath(someLongAndLoopingPath, function (er, real) {
  // Here, the ELOOP gets handled.
})

For the sync version, employ this technique:

var real = rp.realpathSync(someLongAndLoopingPath)

You can choose to replace the in-built fs.realpath/fs.realpathSync with the 'fs.realpath' modules by using the monkeypatch method and can undo it by employing unmonkeypatch method.

rp.monkeypatch() // Monkeypatch the fs.realpath/fs.realpathSync
rp.unmonkeypatch() // Undo the monkeypatch

Take note that usage of the monkeypatch method is at your own risk!

Where are the fs.realpath docs?

You can find the 'fs.realpath' docs in the same GitHub repository where the npm package is hosted. Feel free to browse here for more detailed information and any updates that may have been made. Please remember that understanding documentation is essential for effective use of any tool in software development.

All Versions