META-INF.resources.bower_components.globalize.src.util.function-name.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-globalize Show documentation
Show all versions of jwebmp-globalize Show documentation
The JWebSwing implementation for a full Globalization
define([], function () {
return function (fn) {
if (fn.name !== undefined) {
return fn.name;
}
// fn.name is not supported by IE.
var matches = /^function\s+([\w\$]+)\s*\(/.exec(fn.toString());
if (matches && matches.length > 0) {
return matches[1];
}
};
});