# installed-pods

> Extract installed Pod information from the output of a CocoaPods installation command

Latest version **1.0.0** (published 2015-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install installed-pods
pnpm add installed-pods
yarn add installed-pods
bun add installed-pods
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-10-29 |
| First published | 2015-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | cocoapods, pod, pods, version, install, installed, installing, update, list, match, parse, extract, objectify, detect |

## Links

- npm: https://www.npmjs.com/package/installed-pods
- Repository: https://github.com/shinnn/installed-pods
- Homepage: https://github.com/shinnn/installed-pods#readme
- Issues: https://github.com/shinnn/installed-pods/issues
- npm.io page: https://npm.io/package/installed-pods

## Dependencies (2)

- [strip-ansi](https://npm.io/package/strip-ansi.md) ^3.0.0
- [installed-pod-regex](https://npm.io/package/installed-pod-regex.md) ^1.0.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-10-29

## README

# installed-pods

[![NPM version](https://img.shields.io/npm/v/installed-pods.svg)](https://www.npmjs.com/package/installed-pods)
[![Build Status](https://travis-ci.org/shinnn/installed-pods.svg?branch=master)](https://travis-ci.org/shinnn/installed-pods)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/installed-pods.svg)](https://coveralls.io/r/shinnn/installed-pods)
[![devDependency Status](https://david-dm.org/shinnn/installed-pods.svg)](https://david-dm.org/shinnn/installed-pods)
[![devDependency Status](https://david-dm.org/shinnn/installed-pods/dev-status.svg)](https://david-dm.org/shinnn/installed-pods#info=devDependencies)

Extract installed [Pod](https://cocoapods.org/) information from the output of a [CocoaPods installation command](https://guides.cocoapods.org/terminal/commands.html#group_installation)


```javascript
const installedPods = require('installed-pods');

const stdout = `
Using colored 1.2
Installing rouge 1.10.1
Installing xcjobs 0.2.2 (was 0.1.2)
`;

installedPods(stdout)
/* => [
        {
          current: '1.10.1',
          name: 'rouge'
        },
        {
          current: '0.2.2',
          name: 'xcjobs',
          previous: '0.1.2'
        }
      ]
*/
```

## Installation

[Use npm.](https://docs.npmjs.com/cli/install)

```
npm install installed-pods
```

## API

### installedPods(*str*)

*str*: `String`  
Return: `Array` of plain objects

It parses a string of the installation log generated with CocoaPods installation commands (e.g. [`pod install`](https://guides.cocoapods.org/terminal/commands.html#pod_install)) and returns an array of objects that shows which Pod was installed. Each of the object is in the form:

```javascript
{
  name: "Pod name", // String
  current: "installed version", // String
  previous: "previous version" // String, or `undefined` if the Pod was newly installed
}
```

It automatically strips [ANSI escape codes](https://wikipedia.org/wiki/ANSI_escape_code) before parsing a string.

```javascript
const installedPods = ('installed-pods');

installedPods('\u001b[32mInstalling rouge 1.10.1\u001b[39m');
//=> [{current: '1.10.1', name: 'rouge'}]
```

## License

Copyright (c) 2015 [Shinnosuke Watanabe](https://github.com/shinnn)

Licensed under [the MIT License](./LICENSE).

---
_Source: https://npm.io/package/installed-pods · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
