# slackicons

> A module to generate images similar to Slack profile icons

Latest version **0.1.1** (published 2017-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install slackicons
pnpm add slackicons
yarn add slackicons
bun add slackicons
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-08-26 |
| First published | 2017-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | andrewbrooke |
| Keywords | slack, icons, profile, picture, identicon |

## Links

- npm: https://www.npmjs.com/package/slackicons
- Repository: https://github.com/SyntonicApps/slackicons
- Homepage: https://github.com/SyntonicApps/slackicons#readme
- Issues: https://github.com/SyntonicApps/slackicons/issues
- npm.io page: https://npm.io/package/slackicons

## Dependencies (8)

- [jimp](https://npm.io/package/jimp.md) ^0.2.28
- [zeros](https://npm.io/package/zeros.md) ^1.0.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [seedrandom](https://npm.io/package/seedrandom.md) ^2.4.3
- [randomcolor](https://npm.io/package/randomcolor.md) ^0.5.3
- [save-pixels](https://npm.io/package/save-pixels.md) ^2.3.4
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.26.0
- [stream-to-buffer](https://npm.io/package/stream-to-buffer.md) ^0.1.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2017-08-26
- 0.1.0 — 2017-08-26

## README

# slackicons

A simple Node.js module for generating Slack-like profile icons

![example 1](https://raw.githubusercontent.com/SyntonicApps/slackicons/master/example1.png)
![example 2](https://raw.githubusercontent.com/SyntonicApps/slackicons/master/example2.png)
![example 2](https://raw.githubusercontent.com/SyntonicApps/slackicons/master/example3.png)

Install `npm install slackicons`

Import `const slackicons = require('slackicons')`

## Usage

The `generate` method generates an image, taking an optional random seed and image size.

```
const fs = require('fs');
const slackicons = require('slackicons');

const options = {
    seed: 'slackicons', // Optional, specifies start seed for RNG
    size: 1000 // Optional, specifies output image width and height in pixels (default: 1000)
};

slackicons.generate(options).then((buffer) => {
    // Buffer MIME type is image/png
    fs.writeFileSync('./output.png', buffer);
}).catch((err) => {
    console.error(`Error: ${err}`);
});
```

NOTE: A size of 500 or greater is recommended until some sort of anti aliasing is added.

## Building

slackicons uses Babel to build. Install the latest version of [Node.js](https://nodejs.org/en/)

`npm install`

`npm run build`

The build script transpiles all files in `/src` and outputs them in `/dist`

## Tests

Mocha tests are located in `/test`

[Chai](https://github.com/chaijs/chai) is used for assertion, and [nyc](https://github.com/istanbuljs/nyc) is used for code coverage.

`npm install`

`npm test`

## Contributing

Feel free to fork and PR! I only ask that you follow the ESLint rules set in `.eslintrc.js`.
PRs with ESLint errors will not be accepted.

Make sure to add any Mocha tests for new features!

## [Changelog](CHANGELOG.md)

## [License](LICENSE)

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