git ssb

16+

Dominic / patchbay



Commit 2fe2f978b78aa2ef0221ec2fffa416957e09aee0

make plugs more optimizable

Dominic Tarr committed on 10/25/2016, 9:08:33 PM
Parent: 2190d32d2f4d13578b7f4875a0208779cdf5c002

Files changed

plugs.jschanged
util.jschanged
plugs.jsView
@@ -2,10 +2,9 @@
22
33 exports.first = function first(plug) {
44 return function () {
55 var args = [].slice.call(arguments)
6- args.unshift(plug)
7- return u.firstPlug.apply(null, args)
6 + return u.firstPlug(plug, args)
87 }
98 }
109
1110 exports.map = function (plug) {
@@ -17,4 +16,5 @@
1716 }
1817 }
1918
2019
20 +
util.jsView
@@ -57,13 +57,12 @@
5757 )
5858 })
5959 }
6060
61-exports.firstPlug = function (plugs) {
61 +exports.firstPlug = function (plugs, args) {
6262 if(!Array.isArray(plugs)) throw new Error('plugs must be an array')
63- var args = [].slice.call(arguments)
64- var plugs = args.shift()
6563 return exports.first(plugs, function (fn) {
6664 return fn.apply(null, args)
6765 })
6866 }
6967
68 +

Built with git-ssb-web