iterable-regexp-exec
Advanced tools
Comparing version 1.0.0 to 1.1.0
'use strict'; | ||
module.exports = function iterableReExec(re, str) { | ||
var cloneRegexp = require('clone-regexp'); | ||
module.exports = function iterableReExec(input, str) { | ||
var ret = {}; | ||
ret[Symbol.iterator] = function () { | ||
var re = cloneRegexp(input); | ||
var nextMatch = re.exec(str); | ||
@@ -7,0 +10,0 @@ |
{ | ||
"name": "iterable-regexp-exec", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Iterable interface for RegExp.prototype.exec()", | ||
@@ -32,3 +32,5 @@ "license": "MIT", | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"clone-regexp": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -35,0 +37,0 @@ "ava": "^0.11.0", |
@@ -5,2 +5,4 @@ # iterable-regexp-exec [![Build Status](https://travis-ci.org/dsblv/iterable-regexp-exec.svg?branch=master)](https://travis-ci.org/dsblv/iterable-regexp-exec) | ||
Compatible with multiple other ES2015 features (e.g. `spread operator`, `Array.from()`, `for..of`). | ||
[Iterable interface]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable | ||
@@ -33,3 +35,3 @@ | ||
[`regexp.exec(string)`]: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec | ||
[`regexp.exec(string)`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec | ||
@@ -36,0 +38,0 @@ #### regexp |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3334
20
49
1
+ Addedclone-regexp@^1.0.0
+ Addedclone-regexp@1.0.1(transitive)
+ Addedis-regexp@1.0.0(transitive)
+ Addedis-supported-regexp-flag@1.0.1(transitive)