I ran a program to modify some parts of javascript code when it listened to a var declaration as a function like this:
var some_function = function name(args){
};
The code itself works, but I'm just wondering if it will be possible to remove the "name" for all the functions that I find (this does not break it in another problem that parses my javascript), or if it could be any use for it that I don’t I see.
deleting "name":
var new_function = function(){};
Note: the source file, where it first appeared, was in jquery-1.6.4.js in:
jQuerySub.fn.init = function init( selector, context ) {
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
context = jQuerySub( context );
}
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
};
ty for any help in advance :)
source
share