install @octokit/rest

This commit is contained in:
Luis Fernando Molina committed 2018-02-25 19:00:40 +01:00
1 parent 39d9c0de99
commit e44c6cb357
1145 files changed
+67878 -1

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
module.exports = Hook
var register = require('./lib/register')
var addHook = require('./lib/add')
var removeHook = require('./lib/remove')
function Hook () {
var state = {
registry: {}
}
var hook = register.bind(null, state)
hook.remove = {}
hook.api = {remove: {}}
;['before', 'error', 'after'].forEach(function (kind) {
hook[kind] = hook.api[kind] = addHook.bind(null, state, kind)
hook.remove[kind] = hook.api.remove[kind] = removeHook.bind(null, state, kind)
})
return hook
}