INNER CODE UNIT · JavaScript
MultiSteps
ergonode/frontend · cypress/models/index.js:5
export const MultiSteps = (steps, message, callback) => {
steps.forEach((step) => {
step(message, callback);
});
};
export const escapeStringRegexp = (string) => {
if (typeof string !== 'string') {
throw new TypeError('Expected a string');
}
return string
.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
.replace(/-/g, '\\x2d');
};