git ssb

16+

Dominic / patchbay



Tree: 2fe7cbd5b52517d67ed3f88dc1b4505ee835d992

Files: 2fe7cbd5b52517d67ed3f88dc1b4505ee835d992 / 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