Socket
Socket
Sign inDemoInstall

untildify

Package Overview
Dependencies
1
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 3.0.0

8

index.js
'use strict';
var osHomedir = require('os-homedir');
var home = osHomedir();
const osHomedir = require('os-homedir');
const home = osHomedir();
module.exports = function (str) {
module.exports = str => {
if (typeof str !== 'string') {

@@ -10,3 +10,3 @@ throw new TypeError('Expected a string');

return home ? str.replace(/^~($|\/|\\)/, home + '$1') : str;
return home ? str.replace(/^~($|\/|\\)/, `${home}$1`) : str;
};
{
"name": "untildify",
"version": "2.1.0",
"version": "3.0.0",
"description": "Convert a tilde path to an absolute path: ~/dev => /Users/sindresorhus/dev",

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

"engines": {
"node": ">=0.10.0"
"node": ">=4"
},
"scripts": {
"test": "node test.js"
"test": "xo && ava"
},

@@ -42,4 +42,8 @@ "files": [

"devDependencies": {
"ava": "0.0.4"
"ava": "*",
"xo": "*"
},
"xo": {
"esnext": true
}
}

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

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

@@ -31,2 +31,2 @@ untildify('~/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