hi,
i'm having a global array which holds my css+js includes and i'm looking for the easiest solution for the following issue:
- a function which allows adding more includes (as string) - eg.
addIncludes("script1.js,script2.js,style1.css,style2.css");
- that function should automatically filter duplicate entries
example:
var myIncludes = [];
// add includes
addIncludes("script1.js,script2.js,style1.css,style2.css");
addIncludes("script3.js,script4.js,style1.css,style2.css");
so myIncludes should be:
["script1.js","script2.js","style1.css","style2.css","script3.js","script4.js"]
any ideas what's the most elegant way? thx