m.home

1.0.3 • Public • Published

m.home Build Status

a cross-platform path to the user's home utility from the m.icro series.

const {home, $home} = require('m.home')

// home ==> joining function
// $home ==> home constant

userhome('.bashrc')
  => /Users/ivoputzer/.bashrc

userhome('test', 'sub', 'file')
  => /Users/ivoputzer/test/sub/file

userhome()
  => C:\Users\ivoputzer

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

Package Sidebar

Install

npm i m.home

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • ivoputzer