@olan88/trycatch
v0.0.4
Published
Minimal TypeScript package configured to build both CommonJS and ESM outputs.
Downloads
117
Readme
@olan88/trycatch
Minimal TypeScript package configured to build both CommonJS and ESM outputs.
Build:
npm install
npm run buildUsage examples:
ESM:
import tryCatch, { createTryCatch, tryCatch as namedTryCatch } from '@olan88/trycatch';
// default export === named export `tryCatch`CommonJS:
const { default: tryCatch, createTryCatch } = require('@olan88/trycatch');
// also available as named export
const { tryCatch: namedTryCatch } = require('@olan88/trycatch');