Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

realpath-native

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

realpath-native

Use the system's native `realpath`

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is realpath-native?

The realpath-native npm package provides a way to resolve the real path of a file or directory, similar to the native `fs.realpath` method but with better performance and additional features.

What are realpath-native's main functionalities?

Resolve Real Path

This feature allows you to resolve the real path of a given file or directory. It works asynchronously and provides a callback with the resolved path.

const realpathNative = require('realpath-native');
realpathNative('/some/path', (err, resolvedPath) => {
  if (err) throw err;
  console.log(resolvedPath);
});

Synchronous Real Path Resolution

This feature allows you to resolve the real path of a given file or directory synchronously. It throws an error if the path cannot be resolved.

const realpathNative = require('realpath-native');
try {
  const resolvedPath = realpathNative.sync('/some/path');
  console.log(resolvedPath);
} catch (err) {
  console.error(err);
}

Promise-based Real Path Resolution

This feature allows you to resolve the real path of a given file or directory using Promises, making it easier to work with async/await syntax.

const realpathNative = require('realpath-native');
realpathNative.promise('/some/path')
  .then(resolvedPath => console.log(resolvedPath))
  .catch(err => console.error(err));

Other packages similar to realpath-native

Keywords

FAQs

Package last updated on 07 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc