-
-
Save unscriptable/d9b3a5dc227b95bbd0ad to your computer and use it in GitHub Desktop.
script factory redux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @license MIT License (c) copyright 2014 original authors */ | |
/** @author Brian Cavalier */ | |
/** @author John Hann */ | |
module.exports = scriptFactory; | |
function scriptFactory (scriptEval) { | |
return function (loader, load) { | |
return function () { | |
scriptEval(load.source); | |
}; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @license MIT License (c) copyright 2014 original authors */ | |
/** @author Brian Cavalier */ | |
/** @author John Hann */ | |
module.exports = scriptFactory; | |
function scriptFactory (scriptEval) { | |
return function (loader, load) { | |
return create(scriptEval, load.source); | |
}; | |
} | |
function create (scriptEval, source) { | |
return function () { scriptEval(source); }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment