Some checks are pending
Build AeThex Engine / build-windows (push) Waiting to run
Build AeThex Engine / build-linux (push) Waiting to run
Build AeThex Engine / build-macos (push) Waiting to run
Build AeThex Engine / create-release (push) Blocked by required conditions
Deploy Docsify Documentation / build (push) Waiting to run
Deploy Docsify Documentation / deploy (push) Blocked by required conditions
11 lines
236 B
JavaScript
11 lines
236 B
JavaScript
'use strict';
|
|
|
|
const matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g;
|
|
|
|
module.exports = string => {
|
|
if (typeof string !== 'string') {
|
|
throw new TypeError('Expected a string');
|
|
}
|
|
|
|
return string.replace(matchOperatorsRegex, '\\$&');
|
|
};
|