Sha256: c444193d583d7c86c97eafa786e6e2ed9107e4f96fc33a710cefe6600bdc9e74

Contents?: true

Size: 227 Bytes

Versions: 118

Compression:

Stored size: 227 Bytes

Contents

'use strict';

var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;

module.exports = function (str) {
	if (typeof str !== 'string') {
		throw new TypeError('Expected a string');
	}

	return str.replace(matchOperatorsRe,  '\\$&');
};

Version data entries

118 entries across 82 versions & 8 rubygems

Version Path
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.13 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.12 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.11 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.10 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.9 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.8 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.7 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.6 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.5 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js
trusty-festivity-extension-2.5.4 node_modules/bower/node_modules/chalk/node_modules/escape-string-regexp/index.js