1 Star 0 Fork 0

苍石 / hook-js-core

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
readme.md

@hook-js/core

@hook-js 的核心模块,提供用于劫持 Javascript 方法的 API,可用于 AOP 或者方法劫持

安装

npm install @hook-js/core

或者

yarn add @hook-js/core

简单 DEMO

import {hookBefore} from '@hook-js/core'

hookBefore(window, 'alert', ({args})=>{
    args.push('test')
})

window.alert('hello, hook-js') // > hello, hook-js test

API文档

https://github.com/canguser/hook-js-core/tree/master/docs

Comments ( 0 )

Sign in for post a comment

About

No description spread retract
JavaScript
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
JavaScript
1
https://gitee.com/HGJing/hook-js-core.git
git@gitee.com:HGJing/hook-js-core.git
HGJing
hook-js-core
hook-js-core
master

Search