{
  "name": "@garfish/hooks",
  "version": "1.19.12",
  "description": "hooks module.",
  "keywords": [
    "garfish",
    "hooks"
  ],
  "author": "chentao.arthur <chentao.arthur@bytedance.com>",
  "homepage": "http://garfish.bytedance.com",
  "license": "MIT",
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/esm/index.js",
      "require": "./dist/index.js"
    },
    "./*": "./*"
  },
  "main": "dist/index.js",
  "module": "dist/esm/index.js",
  "types": "./dist/index.d.ts",
  "dependencies": {
    "@garfish/utils": "1.19.12"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/bytedance/garfish.git"
  },
  "bugs": {
    "url": "https://github.com/bytedance/garfish/issues"
  },
  "publishConfig": {
    "registry": "https://registry.npmjs.org",
    "access": "public"
  },
  "scripts": {
    "build": "rimraf dist && tsup src/index.ts",
    "dev": "cross-env WATCH=true tsup src/index.ts"
  },
  "readme": "# `@garfish/hooks`\n\n[![NPM version](https://img.shields.io/npm/v/@garfish/hooks.svg?style=flat-square)](https://www.npmjs.com/package/@garfish/hooks)\n\n## Usage\n\n```js\nimport { AsyncHook, PluginSystem } from '@garfish/hooks';\n\nconst hooks = new PluginSystem({\n  a: new AsyncHook(),\n});\n\nhooks.usePlugin({\n  async a(a, b) {\n    console.log(a, b);\n  },\n});\n\nhooks.lifecycle.a.emit(1, 2);\n```\n\nInherit parent hooks.\n\n```js\nimport { AsyncHook, PluginSystem } from '@garfish/hooks';\n\nconst hooks1 = new PluginSystem({\n  a: new AsyncHook(),\n});\n\nconst hooks2 = new PluginSystem({\n  b: new AsyncHook(),\n});\n\nhooks2.inherit(hooks1);\nhooks2.lifecycle.a.emit();\n```\n"
}