create-require
Polyfill for Node.js module.createRequire (<= v12.2.0)
Last updated 2 months ago by pi0 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install create-require 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.1                                ...           latest (2 months ago)

7 Versions

  • 1.1.1                                ...           2 months ago
  • 1.1.0                                ...           2 months ago
  • 1.0.2                                ...           7 months ago
  • 1.0.1                                ...           7 months ago
  • 1.0.0                                ...           8 months ago
  • 0.0.1                                ...           8 months ago
  • 0.0.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 54
This Week 2,404
This Month 31,431
Last Day 2,350
Last Week 13,241
Last Month 51,871
Dependencies (0)
None
Dev Dependencies (4)

Copyright 2014 - 2017 © taobao.org |