Comparing version 2.0.0 to 3.0.0
@@ -1,7 +0,5 @@ | ||
declare namespace execall { | ||
interface Match { | ||
match: string; | ||
subMatches: string[]; | ||
index: number; | ||
} | ||
export interface Match { | ||
match: string; | ||
subMatches: string[]; | ||
index: number; | ||
} | ||
@@ -17,5 +15,5 @@ | ||
``` | ||
import execall = require('execall'); | ||
import execAll from 'execall'; | ||
execall(/(\d+)/g, '$200 and $400'); | ||
execAll(/(\d+)/g, '$200 and $400'); | ||
// [ | ||
@@ -35,4 +33,2 @@ // { | ||
*/ | ||
declare function execall(regexp: RegExp, string: string): execall.Match[]; | ||
export = execall; | ||
export default function execAll(regexp: RegExp, string: string): Match[]; |
@@ -1,5 +0,4 @@ | ||
'use strict'; | ||
const cloneRegexp = require('clone-regexp'); | ||
import cloneRegexp from 'clone-regexp'; | ||
module.exports = (regexp, string) => { | ||
export default function execAll(regexp, string) { | ||
let match; | ||
@@ -24,2 +23,2 @@ const matches = []; | ||
return matches; | ||
}; | ||
} |
{ | ||
"name": "execall", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Find multiple RegExp matches in a string", | ||
"license": "MIT", | ||
"repository": "sindresorhus/execall", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
@@ -41,9 +44,9 @@ "scripts": { | ||
"dependencies": { | ||
"clone-regexp": "^2.1.0" | ||
"clone-regexp": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
"ava": "^3.15.0", | ||
"tsd": "^0.14.0", | ||
"xo": "^0.38.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# execall [![Build Status](https://travis-ci.org/sindresorhus/execall.svg?branch=master)](https://travis-ci.org/sindresorhus/execall) | ||
# execall | ||
@@ -7,3 +7,2 @@ > Find multiple RegExp matches in a string | ||
## Install | ||
@@ -15,9 +14,8 @@ | ||
## Usage | ||
```js | ||
const execall = require('execall'); | ||
import execAll from 'execall'; | ||
execall(/(\d+)/g, '$200 and $400'); | ||
execAll(/(\d+)/g, '$200 and $400'); | ||
/* | ||
@@ -39,6 +37,5 @@ [ | ||
## API | ||
### execall(regexp, string) | ||
### execAll(regexp, string) | ||
@@ -57,10 +54,4 @@ Returns an `object[]` with a match, sub-matches, and index. | ||
## Related | ||
- [replace-string](https://github.com/sindresorhus/replace-string) - Replace all substring matches in a string | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Sorry, the diff of this file is not supported yet
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
Yes
3704
47
54
+ Addedclone-regexp@3.0.0(transitive)
+ Addedis-regexp@3.1.0(transitive)
- Removedclone-regexp@2.2.0(transitive)
- Removedis-regexp@2.1.0(transitive)
Updatedclone-regexp@^3.0.0