Skip to content

Commit

Permalink
use os.homedir()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Jul 26, 2016
1 parent 3ff001d commit e13f94a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -5,11 +5,11 @@
* Licensed under the MIT license.
*/

var os = require('os');
var path = require('path');
var homedir = require('os-homedir');

module.exports = function expandTilde(filepath) {
var home = homedir();
var home = os.homedir();

if (filepath.charCodeAt(0) === 126 /* ~ */) {
if (filepath.charCodeAt(1) === 43 /* + */) {
Expand Down
13 changes: 6 additions & 7 deletions package.json
Expand Up @@ -10,7 +10,9 @@
},
"license": "MIT",
"files": [
"index.js"
"index.js",
"LICENSE",
"README.md"
],
"main": "index.js",
"engines": {
Expand All @@ -19,9 +21,6 @@
"scripts": {
"test": "mocha"
},
"dependencies": {
"os-homedir": "^1.0.1"
},
"devDependencies": {
"gulp-format-md": "^0.1.9",
"is-windows": "^0.2.0",
Expand Down Expand Up @@ -51,10 +50,10 @@
],
"related": {
"list": [
"micromatch",
"braces",
"expand-brackets",
"is-glob"
"is-glob",
"micromatch"
]
},
"reflinks": [
Expand All @@ -64,4 +63,4 @@
"reflinks": true
}
}
}
}

0 comments on commit e13f94a

Please sign in to comment.