installed-pod-regex

installed-pod-regex JS library on GitHub installed-pod-regex JS library on npm Download installed-pod-regex JS library

Create a regex that matches the newly installed Pod list generated with CocoaPods installation commands

Version 1.0.0 License Unlicense
installed-pod-regex has no homepage
installed-pod-regex JS library on GitHub
installed-pod-regex JS library on npm
Download installed-pod-regex JS library
Keywords
cocoapodspodpodsversioninstallinstalledinstallingupdatelistregexregexpmatchdetectclient-sidebrowser
<script type="module"> import installedPodRegex from 'https://cdn.jsdelivr.net/npm/installed-pod-regex@1.0.0/+esm' </script>
Learn more

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