myname

2.0.1 • Public • Published

myname

Determines the name of a module.

const myname = require('myname')
 
console.log(myname())

What it does

It gets the name of the parent module (the one requiring the myname module). It then removes itself from the module cache so that the next module will have its own parent as the one that myname returns.

License: MIT

Readme

Keywords

Package Sidebar

Install

npm i myname

Weekly Downloads

0

Version

2.0.1

License

MIT

Last publish

Collaborators

  • fhellwig