UNPKG

optional-require

Version:

NodeJS Require that let you handle module not found error without try/catch

46 lines (45 loc) 1.13 kB
{ "name": "optional-require", "version": "2.1.0", "description": "NodeJS Require that let you handle module not found error without try/catch", "type": "module", "main": "./index.cjs", "types": "./index.d.ts", "exports": { ".": { "import": "./dist-esm/esm/index.js", "require": "./index.cjs" } }, "scripts": { "build": "rm -rf dist-* && tsc --build tsconfig.esm.json && tsc --build tsconfig.cjs.json && ts2mjs --cjs --remove-source --skip-ts dist-cjs", "test": "vitest run", "test:coverage": "vitest run --coverage", "docs": "xrun xarc/docs && touch docs/.nojekyll", "prepack": "npm run build && publish-util-prepack", "postpack": "publish-util-postpack" }, "repository": { "type": "git", "url": "git+https://github.com/jchip/optional-require.git" }, "keywords": [ "optional require", "optional", "require" ], "files": [ "dist-cjs", "dist-esm", "index.cjs", "index.d.ts" ], "engines": { "node": ">=20" }, "author": "Joel Chen", "license": "Apache-2.0", "dependencies": { "require-at": "^1.0.6" } }