installed-pod-regex

1.0.0 • Public • Published

installed-pod-regex

NPM version Build Status Coverage Status devDependency Status

Create a regular expression object that matches the newly installed Pod list generated with CocoaPods installation commands

const stdout = `
Using colored 1.2
Installing rouge 1.10.1
Installing xcjobs 0.2.2 (was 0.1.2)
`;
 
stdout.match(installedPodRegex());
//=> ['Installing rouge 1.10.1', 'Installing xcjobs 0.2.2 (was 0.1.2)']

Installation

Package managers

npm

npm install installed-pod-regex

bower

bower install installed-pod-regex

Standalone

Download the script file directly.

API

installedPodRegex()

Return: RegExp instance with g and m flags

const stdout = `
Installing rouge 1.10.1
Installing xcjobs 0.2.2 (was 0.1.2)
`;
 
const regex = installedPodRegex();
 
regex.exec(stdout);
//=> ['Installing rouge 1.10.1', 'rouge', '1.10.1', undefined]
 
// The last item of matching result would be a previous version (if available)
regex.exec(stdout);
//=> ['Installing xcjobs 0.2.2 (was 0.1.2)', 'xcjobs', '0.2.2', '0.1.2']
 
regex.exec(stdout);
//=> null

License

The Unlicense

Package Sidebar

Install

npm i installed-pod-regex

Weekly Downloads

2

Version

1.0.0

License

Unlicense

Last publish

Collaborators

  • shinnn