An open API service indexing awesome lists of open source software.

https://github.com/osdio/sohook

A hook javascript tools.
https://github.com/osdio/sohook

Last synced: 25 days ago
JSON representation

A hook javascript tools.

Awesome Lists containing this project

README

        

Just a hook javascript tools.

This is an example:

```
hook = require 'shook'

test1 = ()->
hook.doAction()
console.log 'do some things'

hookAction = ()->
console.log 'this is hook action!'
hookAction2 = () ->
console.log 'this is hook action2'
hook.addAction test1, hookAction, 1
hook.addAction test1, hookAction2, 2

test1()
hook.removeAction test1, hookAction
test1()

```