"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/slide/lib/bind-actor.js" (8 Mar 2017, 382 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 }