-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdep.min.js
More file actions
executable file
·1 lines (1 loc) · 836 Bytes
/
Copy pathdep.min.js
File metadata and controls
executable file
·1 lines (1 loc) · 836 Bytes
1
function Dep(b){var e={nullArgs:true,groupedArgs:true,bundleArgs:false};if(typeof b!="undefined"){e=b}var f=[];var d=[];var c=null;var a=function(){if(d.length==0){return false}for(var k=0;k<d.length;k++){if(d[k]!==true){return false}}if(c!=null){if(e.nullArgs===false){f=f.filter(function(i){return i!==null})}if(e.groupedArgs===false||e.bundleArgs===true){var g=[];for(var k=0;k<f.length;k++){if("length" in f[k]){for(var h=0;h<f[k].length;h++){g.push(f[k][h])}}else{g.push(f[k])}}f=g}if(e.bundleArgs===true){c(f)}else{c.apply(null,f)}}return true};this.addDep=function(){var h=d.length;d.push(false);f.push(null);var g=function(){if(arguments.length<1){f[h]=null}else{if(arguments.length==1){f[h]=arguments[0]}else{var i=Array.prototype.slice.call(arguments,0);f[h]=i.sort()}}d[h]=true;a()};return g};this.calc=function(g){c=g;a()}};