Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
utils-homedir
Advanced tools
Returns the current user's home directory.
$ npm install utils-homedir
var homedir = require( 'utils-homedir' );
Returns the current user's home
directory.
var home = homedir();
// returns <dirpath>
var homedir = require( 'utils-homedir' );
console.log( homedir() );
To run the example code from the top-level application directory,
$ node ./examples/index.js
To use the module as a general utility, install the module globally
$ npm install -g utils-homedir
Usage: homedir [options]
Options:
-h, --help Print this message.
-V, --version Print package version.
$ homedir
For local installations, modify the command to point to the local installation directory; e.g.,
$ ./node_modules/.bin/homedir
Or, if you have cloned this repository and run npm install
, modify the command to point to the executable; e.g.,
$ node ./bin/cli
Unit tests use the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:
$ make test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
$ make test-cov
Istanbul creates a ./reports/coverage
directory. To access an HTML version of the report,
$ make view-cov
Copyright © 2015. Athan Reines.
FAQs
Returns the current user's home directory.
We found that utils-homedir demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.