• This project
    • Loading...
  • Sign in

양신희 / Chess.gg

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Graphs
  • Issues 1
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • OSS_project
  • Chess
  • node_modules
  • escape-string-regexp
  • index.js
  • 양신희's avatar
    first commit · 1f005a17
    1f005a17
    양신희 authored 2020-06-04 20:21:01 +0900
index.js 226 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11
'use strict';

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

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

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