who-ran-me

1.0.2 • Public • Published

who-ran-me

This is a tiny utility function that is designed to tell you how the current node script has been run. For example if you have a test file that looks like this:

const whoRanMe = require('who-ran-me');
 
describe('who-ran-me utility', function () {
  it('should always just log who ran me!', function () {
    console.log(`Run with ${whoRanMe()}`);
  });
});

And the following scripts entries in your package.json:

{
  "scripts": {
    "test": "mocha"
  }
}

you would have multiple ways to actually execute this test and it will print out the method:

npm test
# Run with npm 
yarn test
# Run with yarn 
# mocha is installed globally 
mocha
# Run with mocha 
# mocha does not need to be installed globally 
npx mocha
# Run with npx 

Readme

Keywords

Package Sidebar

Install

npm i who-ran-me

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

3.17 kB

Total Files

6

Last publish

Collaborators

  • real_ate
  • turbo87
  • mainmatter