1.0.3 • Published 8 years ago

m.home v1.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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.