Skip to content

ajiu9/op-pkg

Repository files navigation

op-pkg

Usage

import {
  importModule,
  isPackageExists,
  resolveModule
} from 'op-pkg'

isPackageExists('op-pkg') // true

// similar to `require.resolve` but works also in ESM
resolveModule('op-pkg')
// '/path/to/node_modules/op-pkg/dist/index.cjs'

// similar to `await import()` but works also in CJS
const { importModule } = await importModule('op-pkg')

License

MIT License © 2024-PRESENT Ajiu9

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published