VulpesOS/gaia/apps/email/js/regExpEscape.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

13 lines
363 B
JavaScript
Executable file

'use strict';
/**
* Taken from the ECMAScript proposal polyfill in the repo:
* https://github.com/benjamingr/RegExp.escape
* git commit: de7b32f9f72d15f9d580119963139d1027c46bbe
* Copyright CC0 1.0 Universal Benjamin Gruenbaum 2015
*/
define(function() {
return function regExpEscape(str) {
return str.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
};
});