Skip to content

sdgluck/path-homedir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

path-homedir

Get a path in the user home directory

Unlike the resolve-* these modules allow resolution of non-module paths.

Install

npm install --save path-homedir
yarn add path-homedir

Import

// ES2015
import homedir from 'path-homedir'
// CommonJS
var homedir = require('path-homedir')

Usage

homedir([path]) : String

Get a path in the user's home directory.

  • path {String} (optional) path to get in the home directory

Returns a string.

Example

import homedir from 'path-homedir'

homedir('pineapple') //=> C:/User/Spongebob Squarepants/pineapple

See also

Contributing

All pull requests and issues welcome!

If you're not sure how, check out the great video tutorials on egghead.io!

License

MIT © Sam Gluck

About

Get a path in the user home directory

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published