Socket
Socket
Sign inDemoInstall

tildify

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

tildify

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


Version published
Maintainers
1
Weekly downloads
1,676,310
decreased by-9.46%

Weekly downloads

Package description

What is tildify?

The tildify npm package is used to convert absolute paths into a tilde path, which replaces the user's home directory with a tilde (~). This can be useful for displaying paths in a more readable and user-friendly format, especially in command-line applications or logging.

What are tildify's main functionalities?

Convert absolute path to tilde path

This feature takes an absolute path and converts it to a tilde path by replacing the user's home directory with a tilde (~).

const tildify = require('tildify');
const tildePath = tildify('/Users/username/project');
console.log(tildePath); // Outputs: '~/project'

Other packages similar to tildify

Readme

Source

tildify

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

Install

$ npm install tildify

Usage

import tildify from 'tildify';

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

See untildify for the inverse.

Keywords

FAQs

Last updated on 12 Aug 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc