git ssb

0+

dangerousbeans / patchbay-bootstrap



Tree: 3c5dd43a2f6adbcaaad339b0a31e11f7d87eec1f

Files: 3c5dd43a2f6adbcaaad339b0a31e11f7d87eec1f / plugs.js

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

Built with git-ssb-web