UNPKG
@hoodie/client
Version:
latest (10.2.0)
10.2.0
10.1.1
10.1.0
10.0.2
10.0.1
10.0.0
9.0.2
9.0.1
9.0.0
8.0.3
8.0.2
8.0.1
8.0.0
7.0.0
6.0.0
5.0.7
5.0.6
5.0.5
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.4.1
Client API for the Hoodie server
github.com/hoodiehq/hoodie-client
hoodiehq/hoodie-client
@hoodie/client
/
lib
/
plugin.js
14 lines
(11 loc)
•
285 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module
.
exports
=
function
pluginMethod
(
hoodie, options, plugin
) {
if
(
typeof
plugin ===
'function'
) {
plugin
(hoodie, options) }
if
(
typeof
plugin ===
'object'
) {
Object
.
keys
(plugin).
forEach
(
function
(
key
) { hoodie[key] = plugin[key] }) }
return
hoodie }