Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

create-require

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

create-require

Polyfill for Node.js module.createRequire (<= v12.2.0)

    1.1.1latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
14,481,230
decreased by-8.65%

Weekly downloads

Changelog

Source

1.1.1 (2020-11-26)

Bug Fixes

  • types: explicitly import the URL type (#3) (66a98cc)

Readme

Source

create-require

npm version npm downloads Github Actions Codecov

Polyfill for Node.js module.createRequire (<= v12.2.0)

Install

yarn add create-require

npm install create-require

Usage

function createRequire (filename: string | URL): NodeRequire;
const createRequire = require('create-require')

const myRequire = createRequire('path/to/test.js')
const myModule = myRequire('./test-sibling-module')

License

MIT

FAQs

Last updated on 26 Nov 2020

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
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc