diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:38:50 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:40:43 +0200 |
commit | 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 (patch) | |
tree | 6de9a1aebd150a23b7f8c273ec657a5d0a18fe3e /node_modules/babel-helper-regex | |
parent | 963b7a41feb29cc4be090a2446bdfe0c1f1bcd81 (diff) | |
download | wallet-core-7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027.tar.xz |
add linting (and some initial fixes)
Diffstat (limited to 'node_modules/babel-helper-regex')
-rw-r--r-- | node_modules/babel-helper-regex/.npmignore | 3 | ||||
-rw-r--r-- | node_modules/babel-helper-regex/README.md | 5 | ||||
-rw-r--r-- | node_modules/babel-helper-regex/lib/index.js | 28 | ||||
-rw-r--r-- | node_modules/babel-helper-regex/package.json | 13 |
4 files changed, 49 insertions, 0 deletions
diff --git a/node_modules/babel-helper-regex/.npmignore b/node_modules/babel-helper-regex/.npmignore new file mode 100644 index 000000000..47cdd2c65 --- /dev/null +++ b/node_modules/babel-helper-regex/.npmignore @@ -0,0 +1,3 @@ +src +test +node_modules diff --git a/node_modules/babel-helper-regex/README.md b/node_modules/babel-helper-regex/README.md new file mode 100644 index 000000000..bcdfccba9 --- /dev/null +++ b/node_modules/babel-helper-regex/README.md @@ -0,0 +1,5 @@ +# babel-helper-regex + +## Usage + +TODO diff --git a/node_modules/babel-helper-regex/lib/index.js b/node_modules/babel-helper-regex/lib/index.js new file mode 100644 index 000000000..803ae5664 --- /dev/null +++ b/node_modules/babel-helper-regex/lib/index.js @@ -0,0 +1,28 @@ +"use strict"; + +exports.__esModule = true; +exports.is = is; +exports.pullFlag = pullFlag; + +var _pull = require("lodash/pull"); + +var _pull2 = _interopRequireDefault(_pull); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function is(node, flag) { + return t.isRegExpLiteral(node) && node.flags.indexOf(flag) >= 0; +} + +function pullFlag(node, flag) { + var flags = node.flags.split(""); + if (node.flags.indexOf(flag) < 0) return; + (0, _pull2.default)(flags, flag); + node.flags = flags.join(""); +}
\ No newline at end of file diff --git a/node_modules/babel-helper-regex/package.json b/node_modules/babel-helper-regex/package.json new file mode 100644 index 000000000..894abcea0 --- /dev/null +++ b/node_modules/babel-helper-regex/package.json @@ -0,0 +1,13 @@ +{ + "name": "babel-helper-regex", + "version": "6.24.1", + "description": "Helper function to check for literal RegEx", + "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-regex", + "license": "MIT", + "main": "lib/index.js", + "dependencies": { + "babel-runtime": "^6.22.0", + "lodash": "^4.2.0", + "babel-types": "^6.24.1" + } +} |