You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

untildify

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

untildify

Convert a tilde path to an absolute path: `~/dev` → `/Users/sindresorhus/dev`


Version published
Weekly downloads
13M
decreased by-0.98%
Maintainers
1
Install size
2.86 kB
Created
Weekly downloads
 

Package description

What is untildify?

The untildify npm package is used to convert a tilde path to an absolute path. It expands the tilde (~) in file paths to the user's home directory, which is particularly useful in Node.js applications where file paths are often specified in configuration files or command line arguments.

What are untildify's main functionalities?

Path Expansion

This feature allows the expansion of the tilde (~) symbol to the user's home directory in a file path. It's useful for scripts and applications that need to access user-specific directories without hardcoding absolute paths.

const untildify = require('untildify');
console.log(untildify('~/Desktop')); // Outputs absolute path to the Desktop directory

Other packages similar to untildify

Readme

Source

untildify

Convert a tilde path to an absolute path: ~/dev/Users/sindresorhus/dev

Install

npm install untildify

Usage

import untildify from 'untildify';

untildify('~/dev');
//=> '/Users/sindresorhus/dev'

See tildify for the inverse.

Keywords

FAQs

Package last updated on 11 Jun 2023

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc