# sum-up

> Summarize package information

Latest version **3.0.1** (published 2017-12-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install sum-up
pnpm add sum-up
yarn add sum-up
bun add sum-up
```

## 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 | 3.0.1 |
| Published | 2017-12-11 |
| First published | 2014-11-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | summerize, summary, brief, outline, info, information, description, data, package, color, colour, cli-friendly |

## Links

- npm: https://www.npmjs.com/package/sum-up
- Repository: https://github.com/shinnn/sum-up
- Issues: https://github.com/shinnn/sum-up/issues
- npm.io page: https://npm.io/package/sum-up

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [inspect-with-kind](https://npm.io/package/inspect-with-kind.md) ^1.0.3

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 3.0.1 (latest) — 2017-12-11
- 3.0.0 — 2017-07-10
- 2.0.0 — 2016-03-28
- 1.0.3 — 2016-03-23
- 1.0.2 — 2015-06-10
- 1.0.1 — 2015-02-24
- 1.0.0 — 2014-11-29
- 0.0.0 — 2014-11-29

## README

# sum-up

[![npm version](https://img.shields.io/npm/v/sum-up.svg)](https://www.npmjs.com/package/sum-up)
[![Build Status](https://travis-ci.org/shinnn/sum-up.svg?branch=master)](https://travis-ci.org/shinnn/sum-up)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/sum-up.svg)](https://coveralls.io/r/shinnn/sum-up)

Summarize package information

```javascript
const sumUp = require('sum-up');
console.log(sumUp(require('./package.json')));
```

![Screenshot](./screenshot.png "Screenshot")

It helps your CLI tool to display information with `--help` flag.

## Installation

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

```
npm install sum-up
```

## API

```javascript
const sumUp = require('sum-up');
```

### sumUp(*pkgData* [, *option*])

*pkgData*: `Object`  
*option*: `Object`  
Return: `string`

It joins the `name`, `version`, `homepage` and `description` properties (all is optional) of the first argument into a string colorized with [ANSI escape code](https://github.com/sindresorhus/ansi-styles).

#### option.color

Type: `boolean`  
Default: `true` if [the environment supports colors](https://github.com/sindresorhus/supports-color), otherwise `false`

`false` omits all ANSI escape code from the string.

```javascript
const data = {
  name: 'cli-name',
  version: '0.6.11',
  description: 'My CLI tool.'
}

sumUp(data); //=> '\u001b[36mcli-name\u001b[39m \u001b[90mv0.6.11\u001b[39m\nMy CLI tool.'
sumUp(data, {color: false}); //=> 'cli-name v0.6.11\nMy CLI tool.'
```

## License

[ISC License](./LICENSE) © 2017 Shinnosuke Watanabe

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