Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
13 lines
363 B
JavaScript
Executable file
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, '\\$&');
|
|
};
|
|
});
|