Quantumbraid's picture
|
download
raw
1.42 kB

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

Xet Storage Details

Size:
1.42 kB
·
Xet hash:
38ccf09f6e8f72c7681a76223f62e3a32be5962ec09069705165feef653d2c4f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.