mirror of https://github.com/torappinfo/uweb
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
600 B
JavaScript
23 lines
600 B
JavaScript
var MCommon = (function () {
|
|
return {
|
|
/**
|
|
* Get file extension.
|
|
*/
|
|
getExtension: function (filename, defaultExt) {
|
|
return /(?:\.([^.]+))?$/.exec(filename)[1] || defaultExt;
|
|
},
|
|
|
|
/**
|
|
* Regular expression to strip key if dictionary's "StripKey" attribute is true.
|
|
*/
|
|
REGEXP_STRIPKEY: {
|
|
'mdx' : /[()., '/\\@_-]()/g,
|
|
'mdd' : /([.][^.]*$)|[()., '/\\@_-]/g // strip '.' before file extension that is keeping the last period
|
|
},
|
|
|
|
log: function() {
|
|
console.log.apply(console, [].slice.apply(arguments));
|
|
}
|
|
};
|
|
}());
|