untildify
Advanced tools
Comparing version 3.0.2 to 3.0.3
'use strict'; | ||
const os = require('os'); | ||
const home = os.homedir(); | ||
const home = require('os').homedir(); | ||
module.exports = str => { | ||
@@ -10,3 +10,3 @@ if (typeof str !== 'string') { | ||
return home ? str.replace(/^~($|\/|\\)/, `${home}$1`) : str; | ||
return home ? str.replace(/^~(?=$|\/|\\)/, home) : str; | ||
}; |
{ | ||
"name": "untildify", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Convert a tilde path to an absolute path: ~/dev => /Users/sindresorhus/dev", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2680
8