Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

require-main-filename

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

require-main-filename

shim for require.main.filename() that works in as many environments as possible

    2.0.0latest
    Github

Version published
Maintainers
1
Weekly downloads
23,853,779
increased by9.07%

Weekly downloads

Changelog

Source

2.0.0 (2019-01-28)

Chores

  • drop support for Node 0.10 (#11) (87f4e13)

BREAKING CHANGES

  • drop support for Node 0.10/0.12

<a name="1.0.2"></a>

Readme

Source

require-main-filename

Build Status Coverage Status NPM version

require.main.filename is great for figuring out the entry point for the current application. This can be combined with a module like pkg-conf to, as if by magic, load top-level configuration.

Unfortunately, require.main.filename sometimes fails when an application is executed with an alternative process manager, e.g., iisnode.

require-main-filename is a shim that addresses this problem.

Usage

var main = require('require-main-filename')() // use main as an alternative to require.main.filename.

License

ISC

Keywords

FAQs

What is require-main-filename?

shim for require.main.filename() that works in as many environments as possible

Is require-main-filename popular?

The npm package require-main-filename receives a total of 22,749,093 weekly downloads. As such, require-main-filename popularity was classified as popular.

Is require-main-filename well maintained?

We found that require-main-filename 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.

Last updated on 28 Jan 2019

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc