Socket
Socket
Sign inDemoInstall

untildify

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 1.0.0

10

index.js
'use strict';
var userHome = require('user-home');
module.exports = function (str) {
var dir = process.env.HOME;
if (process.platform === 'win32') {
dir = dir || process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH;
}
return dir ? str.replace(/^~\//, dir + '/') : str;
return userHome ? str.replace(/^~\//, userHome + '/') : str;
};
{
"name": "untildify",
"version": "0.1.0",
"version": "1.0.0",
"description": "Convert a tilde path to an absolute path: ~/dev => /Users/sindresorhus/dev",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "mocha"
"test": "node test.js"
},

@@ -24,2 +24,3 @@ "files": [

"tilde",
"untildify",
"path",

@@ -29,7 +30,11 @@ "home",

"directory",
"expand"
"expand",
"user"
],
"dependencies": {
"user-home": "^1.0.0"
},
"devDependencies": {
"mocha": "*"
"ava": "0.0.3"
}
}

@@ -5,8 +5,6 @@ # untildify [![Build Status](https://travis-ci.org/sindresorhus/untildify.svg?branch=master)](https://travis-ci.org/sindresorhus/untildify)

See the [tildify](https://github.com/sindresorhus/tildify) module for the inverse.
## Install
```bash
```sh
$ npm install --save untildify

@@ -26,4 +24,9 @@ ```

## Related
See [tildify](https://github.com/sindresorhus/tildify) for the inverse.
## License
MIT © [Sindre Sorhus](http://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