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

expand-tilde

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expand-tilde

Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.9M
decreased by-0.32%
Maintainers
2
Weekly downloads
 
Created

What is expand-tilde?

The expand-tilde npm package is designed to expand the tilde (~) in file paths to the user's home directory. This is particularly useful in Node.js applications where you might need to access or specify paths relative to the user's home directory in a platform-independent way.

What are expand-tilde's main functionalities?

Expand tilde to home directory

This feature allows the expansion of the tilde (~) to the current user's home directory. In the code sample, '~/example' is expanded to the full path, such as '/Users/username/example' on macOS or Linux, and 'C:\Users\username\example' on Windows.

const expandTilde = require('expand-tilde');
console.log(expandTilde('~/example'));

Other packages similar to expand-tilde

Keywords

FAQs

Package last updated on 08 Dec 2016

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