# iscool

> Lets you know if a word is cool or not. Current use: Twitter bots.

Latest version **2.0.1** (published 2020-05-15) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2.0.1 |
| Published | 2020-05-15 |
| First published | 2014-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jim Kang |
| Maintainers | jimkang |
| Keywords | filter, blacklist, words, content |

## Links

- npm: https://www.npmjs.com/package/iscool
- Repository: https://github.com/jimkang/iscool
- Issues: https://github.com/jimkang/iscool/issues
- npm.io page: https://npm.io/package/iscool

## Dependencies (2)

- [immutable](https://npm.io/package/immutable.md) ^3.4.1
- [wordfilter](https://npm.io/package/wordfilter.md) ^0.2.4

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 2.0.1 (latest) — 2020-05-15
- 2.0.0 — 2019-04-18
- 1.1.64 — 2018-08-15
- 1.1.63 — 2018-06-23
- 1.1.62 — 2018-04-24
- 1.1.61 — 2018-02-19
- 1.1.60 — 2018-02-15
- 1.1.59 — 2018-02-15
- 1.1.58 — 2018-01-19
- 1.1.57 — 2017-12-14
- 1.1.56 — 2017-12-04
- 1.1.55 — 2017-11-05
- 1.1.54 — 2017-10-31
- 1.1.53 — 2017-10-28
- 1.1.52 — 2017-10-02
- … 68 more at https://npm.io/package/iscool/versions

## README

iscool
======

This module provides a function you can use to find out if a word is cool, where "cool" is defined as "not a bummer for me to see spit out by a [Twitter bot](https://twitter.com/godtributes)." Uncool words include racist, sexist, or transphobic slurs. It also has words that may not be slurs but have terrible associations and are chilling (to me) to see in generated text from something that's supposed to be fun, like "Nazi".

It compares candidates to a few lists containing words (many of which were discovered via @godtributes spitting them out live) and falls back to [Wordfilter](https://github.com/dariusk/wordfilter) after that.

Installation
------------

    npm install iscool

Usage
-----

    var createIsCool = require('iscool');
    isCool = createIsCool();
    isCool('trees');
    // true

When creating the function, you can specify the following options:

- `customBlacklist`: An array of extra words that you consider uncool.
- `logger`: An object with a `log` method. If you pass this, iscool will call `log` with a message about an uncool word whenever it finds one.
- `tragedyHappenedRecently`: If this is true, it will check candidates against `tragedyModeBlacklist`, which contains words that are a bummer in light of current events. In practice, this is basically always true.
- `tragedyModeBlacklist`: There is a [default tragedyModeBlacklist](https://github.com/jimkang/iscool/blob/master/defaultlists.js), so you do not have to provide one, but if you do it will override the default one.
- `extendedBlacklist`: There is a [default extendedBlacklist](https://github.com/jimkang/iscool/blob/master/defaultlists.js) containing words that are not cool. It is extended in the sense that `wordfilter` may not contain them. You can override it with this option.
- `falsePositives`: There is a [default falsePositives](https://github.com/jimkang/iscool/blob/master/defaultlists.js), so you do not have to provide one, but if you do it will override the default one. This is a list of words that are not really words I want a bot to use, even if they're not horrible. It's stuff like "imo" and "http".

Example:

    var isCool = createIsCool({
      customBlacklist: [
        'hastur',
        'voldemort'
      ],
      logger: console
    });

    isCool('hastur');
    // false
    // Uncool word: hastur

Tests
-----

Run tests with `make test`.

License
-------

MIT.

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