mirror of
https://github.com/pdemian/human2regex.git
synced 2025-05-16 20:40:08 -07:00
27 lines
510 B
TypeScript
27 lines
510 B
TypeScript
/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */
|
|
|
|
"use strict";
|
|
|
|
/*
|
|
String.prototype.escape = function() {
|
|
var tagsToReplace = {
|
|
'&': '&',
|
|
'<': '<',
|
|
'>': '>'
|
|
};
|
|
return this.replace(/[&<>]/g, function(tag) {
|
|
return tagsToReplace[tag] || tag;
|
|
});
|
|
};
|
|
String.prototype.norm = function() {
|
|
if(String.prototype.normalize != undefined) {
|
|
return this.normalize("NFD").replace(/[\u0300-\u036F]/g,"");
|
|
}
|
|
return this;
|
|
};
|
|
|
|
*/
|
|
|
|
$( function() {
|
|
|
|
}); |