git ssb

16+

Dominic / patchbay



Tree: 461891f5e7000d2ff9993e59870f71d69408cd36

Files: 461891f5e7000d2ff9993e59870f71d69408cd36 / 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