Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

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

Version published
Maintainers
1
Weekly downloads
22,764,521
decreased by-3.51%

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 21,544,599 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. It has 1 open source maintainer collaborating on the project.

Last updated on 28 Jan 2019
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc