Icard/angular-clarity-master(work.../node_modules/create-require
realSnehal 400e0876de frontend 2024-07-16 20:25:36 +05:30
..
CHANGELOG.md frontend 2024-07-16 20:25:36 +05:30
LICENSE frontend 2024-07-16 20:25:36 +05:30
README.md frontend 2024-07-16 20:25:36 +05:30
create-require.d.ts frontend 2024-07-16 20:25:36 +05:30
create-require.js frontend 2024-07-16 20:25:36 +05:30
package.json frontend 2024-07-16 20:25:36 +05:30

README.md

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