installed-pod-regex
v1.0.0
Published
Create a regex that matches the newly installed Pod list generated with CocoaPods installation commands
Downloads
10
Maintainers
Readme
installed-pod-regex
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