@guodun/tapable
v1.0.0
Published
A lightweight tapable hook library published as native ESM.
Downloads
148
Readme
@guodun/tapable
A lightweight tapable hook library published as native ESM.
Installation
npm install @guodun/tapableUsage
import { SyncHook } from '@guodun/tapable'
const hook = SyncHook(['name'])
hook.tap('greet', (name) => {
console.log(`hello ${name}`)
})
hook.call('tapable')Exports
SyncHookSyncBailHookSyncWaterfallHookSyncLoopHookAsyncParallelHookAsyncParallelBailHookAsyncSeriesHookAsyncSeriesBailHookAsyncSeriesLoopHookAsyncSeriesWaterfallHookHookMapMultiHook
Notes
- This package is published as native ESM.
- CommonJS
require()is not supported in this release format. - Type declarations are provided via
index.d.ts.
