git ssb

16+

Dominic / patchbay



Tree: 287cfa70a645df435a34f56c682ad34f826eba00

Files: 287cfa70a645df435a34f56c682ad34f826eba00 / plugs.js

375 bytesRaw
1var u = require('./util')
2
3exports.first = function first(plug) {
4 return function () {
5 var args = [].slice.call(arguments)
6 return u.firstPlug(plug, args)
7 }
8}
9
10exports.map = function (plug) {
11 return function () {
12 var args = [].slice.call(arguments)
13 return plug.map(function (fn) {
14 if(fn) return fn.apply(null, args)
15 }).filter(Boolean)
16 }
17}
18
19
20
21

Built with git-ssb-web