Added function to underscore convert strings.
This commit is contained in:
parent
89e83717f0
commit
f2b1dd2f26
1 changed files with 8 additions and 3 deletions
|
@ -203,6 +203,11 @@ function clone2(item) {
|
|||
return result;
|
||||
}
|
||||
|
||||
// taken from https://github.com/epeli/underscore.string/blob/master/underscored.js
|
||||
function underscored (str) {
|
||||
return str.trim().replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase();
|
||||
}
|
||||
|
||||
jQuery.event.special.remove = {
|
||||
remove: function(e) {
|
||||
if (e.handler) e.handler();
|
||||
|
|
Loading…
Reference in a new issue