aboutsummaryrefslogtreecommitdiff
path: root/node_modules/chalk
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-28 00:38:50 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-28 00:40:43 +0200
commit7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 (patch)
tree6de9a1aebd150a23b7f8c273ec657a5d0a18fe3e /node_modules/chalk
parent963b7a41feb29cc4be090a2446bdfe0c1f1bcd81 (diff)
downloadwallet-core-7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027.tar.xz
add linting (and some initial fixes)
Diffstat (limited to 'node_modules/chalk')
-rw-r--r--node_modules/chalk/node_modules/escape-string-regexp/index.js11
-rw-r--r--node_modules/chalk/node_modules/escape-string-regexp/package.json36
-rw-r--r--node_modules/chalk/node_modules/escape-string-regexp/readme.md27
3 files changed, 74 insertions, 0 deletions
diff --git a/node_modules/chalk/node_modules/escape-string-regexp/index.js b/node_modules/chalk/node_modules/escape-string-regexp/index.js
new file mode 100644
index 000000000..ac6572cab
--- /dev/null
+++ b/node_modules/chalk/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(matchOperatorsRe, '\\$&');
+};
diff --git a/node_modules/chalk/node_modules/escape-string-regexp/package.json b/node_modules/chalk/node_modules/escape-string-regexp/package.json
new file mode 100644
index 000000000..1dff6ff23
--- /dev/null
+++ b/node_modules/chalk/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "escape-string-regexp",
+ "version": "1.0.2",
+ "description": "Escape RegExp special characters",
+ "license": "MIT",
+ "repository": "sindresorhus/escape-string-regexp",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "regex",
+ "regexp",
+ "re",
+ "regular",
+ "expression",
+ "escape",
+ "string",
+ "str",
+ "special",
+ "characters"
+ ],
+ "devDependencies": {
+ "mocha": "*"
+ }
+}
diff --git a/node_modules/chalk/node_modules/escape-string-regexp/readme.md b/node_modules/chalk/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 000000000..808a963a8
--- /dev/null
+++ b/node_modules/chalk/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,27 @@
+# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+
+## Install
+
+```sh
+$ npm install --save escape-string-regexp
+```
+
+
+## Usage
+
+```js
+var escapeStringRegexp = require('escape-string-regexp');
+
+var escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> how much \$ for a unicorn\?
+
+new RegExp(escapedString);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)