PHP 8.2.30
Preview: index.js Size: 461 B
/home/byroehnu/.trash/node_modules11/escape-string-regexp/index.js

'use strict';

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

	// Escape characters with special meaning either inside or outside character sets.
	// Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
	return string
		.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
		.replace(/-/g, '\\x2d');
};

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
467 B lrw-r--r-- 2026-02-21 00:53:22
Edit Download
461 B lrw-r--r-- 2026-02-21 00:53:18
Edit Download
1.09 KB lrw-r--r-- 2026-02-21 00:53:16
Edit Download
686 B lrw-r--r-- 2026-02-21 00:53:18
Edit Download
1.03 KB lrw-r--r-- 2026-02-21 00:53:20
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).