]> gerrit.simantics Code Review - simantics/district.git/blob - node_modules/slide/lib/bind-actor.js
Hide "enabled" column for non-component type tech type tables
[simantics/district.git] / node_modules / slide / lib / bind-actor.js
1 module.exports = bindActor
2 function bindActor () {
3   var args = 
4         Array.prototype.slice.call
5         (arguments) // jswtf.
6     , obj = null
7     , fn
8   if (typeof args[0] === "object") {
9     obj = args.shift()
10     fn = args.shift()
11     if (typeof fn === "string")
12       fn = obj[ fn ]
13   } else fn = args.shift()
14   return function (cb) {
15     fn.apply(obj, args.concat(cb)) }
16 }