https://github.com/shinnn/outdated-pod-regex
Create a regex that matches the Pod list generated with `pod outdated`
https://github.com/shinnn/outdated-pod-regex
cocoapods javascript npm-package regular-expression xcode
Last synced: 6 months ago
JSON representation
Create a regex that matches the Pod list generated with `pod outdated`
- Host: GitHub
- URL: https://github.com/shinnn/outdated-pod-regex
- Owner: shinnn
- License: unlicense
- Created: 2015-10-26T10:48:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T21:32:42.000Z (over 6 years ago)
- Last Synced: 2025-09-20T04:40:58.369Z (6 months ago)
- Topics: cocoapods, javascript, npm-package, regular-expression, xcode
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# outdated-pod-regex
[](https://www.npmjs.com/package/outdated-pod-regex)
[](https://travis-ci.org/shinnn/outdated-pod-regex)
[](https://coveralls.io/r/shinnn/outdated-pod-regex)
Create a [regular expression](http://www.ecma-international.org/ecma-262/5.1/#sec-15.10) that matches the outdated [Pod](https://cocoapods.org/) list generated with [`pod outdated`](https://guides.cocoapods.org/terminal/commands.html#pod_outdated) command
```javascript
const stdout = `
- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)
- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)
`;
stdout.match(outdatedPodRegex());
//=> ['- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)', '- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)']
```
## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install outdated-pod-regex
```
## API
### outdatedPodRegex()
Return: `RegExp` with `g` and `m` flags
```javascript
const stdout = `
- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)
- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)
`;
const regex = outdatedPodRegex();
regex.exec(stdout);
//=> ['- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)', 'CrittercismSDK', '5.3.0', '5.3.0', '5.4.0']
regex.exec(stdout);
//=> ['- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)', 'GCDWebServer', '3.2.5', '3.2.7', '3.2.7']
regex.exec(stdout);
//=> null
```
## License
[The Unlicense](./LICENSE)