Files
roll20-character-sheets/Shadowrun6th-German/node_modules/escape-string-regexp/index.js
T
Valanor 20750d1f6e Implementing EJS-Template Engine
Adding EJS via npm
Creating ejs-templates for each Tab in the Charakter sheet
2021-03-17 13:09:13 +01:00

12 lines
226 B
JavaScript

'use strict';
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
module.exports = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
};