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
(function(){ | |
// build a storage for libraries | |
var libraryStorage = {}; | |
function librarySystem(libraryName, dependencyArray, callback){ | |
// when has dependencyArray and callback | |
if(arguments.length > 1){ | |
// when has dependency | |
if(dependencyArray.length > 0){ | |
// save the content of dependency in an array |
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
function runWithDebugger(callback, array){ | |
debugger; | |
// when has second argument | |
if(arguments.length > 1){ | |
// when second argument's type is array | |
if(Array.isArray(array)){ | |
callback.apply(null, array); | |
// when second argument's type is not array |
NewerOlder