userhome

1.0.0 • Public • Published

userhome Build Status

A cross-platform (OSX, Windows, Linux) path to the user's home.

var userhome = require('userhome');
 
console.log(userhome('.bashrc'));
// /Users/shama/.bashrc
 
console.log(userhome('test', 'sub', 'file'));
// /Users/shama/test/sub/file
 
console.log(userhome());
// C:\Users\shama

If a valid user home environment variable could not be found an error will be thrown indicating so.

Release History

  • 1.0.0 - Throws an error if a user home can not be found.
  • 0.1.0 - initial release

License

Copyright (c) 2014 Kyle Robinson Young
Licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    417,121
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    417,121
  • 0.1.0
    8

Package Sidebar

Install

npm i userhome

Weekly Downloads

417,129

Version

1.0.0

License

none

Last publish

Collaborators

  • shama