Skip to content

Instantly share code, notes, and snippets.

@Gozala
Forked from fitzgen/gist:4637923
Last active December 11, 2015 17:58
Show Gist options
  • Save Gozala/4637925 to your computer and use it in GitHub Desktop.
Save Gozala/4637925 to your computer and use it in GitHub Desktop.
var obj = {
_discoverScriptsAndSources: function TA__discoverScriptsAndSources() {
let scriptsAdded = [];
for (let s of this.dbg.findScripts()) {
if (!this._allowSource(s.url)) {
continue;
}
scriptsAdded.push(this._addScript(s));
}
return scriptsAdded;
}
}
let doShit = promised(function doShit() {
// do you're shit here
})
doShit.apply(null, obj._discoverScriptsAndSources())
@Gozala
Copy link
Author

Gozala commented Jan 25, 2013

var and = function(...args) {
  return args.reduce(promised(function(acc, value) {
    acc.push(value)
    return acc
  }, []))
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment