Socket
Socket
Sign inDemoInstall

tildify

Package Overview
Dependencies
1
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.2.0

2

index.js

@@ -8,3 +8,3 @@ 'use strict';

str = path.normalize(str) + path.sep;
return str.replace(home + path.sep, '~' + path.sep).slice(0, -1);
return (str.indexOf(home) === 0 ? str.replace(home + path.sep, '~' + path.sep) : str).slice(0, -1);
};
{
"name": "tildify",
"version": "1.1.2",
"description": "Convert an absolute path to a tilde path: /Users/sindresorhus/dev => ~/dev",
"version": "1.2.0",
"description": "Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`",
"license": "MIT",

@@ -16,3 +16,3 @@ "repository": "sindresorhus/tildify",

"scripts": {
"test": "node test.js"
"test": "xo && ava"
},

@@ -23,4 +23,7 @@ "files": [

"keywords": [
"unexpand",
"homedir",
"tilde",
"tildify",
"collapse",
"path",

@@ -31,4 +34,3 @@ "home",

"user",
"expand",
"unexpand"
"expand"
],

@@ -39,4 +41,5 @@ "dependencies": {

"devDependencies": {
"ava": "0.0.4"
"ava": "*",
"xo": "*"
}
}
# tildify [![Build Status](https://travis-ci.org/sindresorhus/tildify.svg?branch=master)](https://travis-ci.org/sindresorhus/tildify)
> Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` => `~/dev`
> Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`

@@ -16,3 +16,3 @@

```js
var tildify = require('tildify');
const tildify = require('tildify');

@@ -31,2 +31,2 @@ tildify('/Users/sindresorhus/dev');

MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)
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