# @darkobits/lolcatjs

> Fork of https://github.com/robertmarsal/lolcatjs.

Latest version **4.0.1** (published 2024-07-15) · Hippocratic license · 0 weekly downloads

## Install

```sh
npm install @darkobits/lolcatjs
pnpm add @darkobits/lolcatjs
yarn add @darkobits/lolcatjs
bun add @darkobits/lolcatjs
```

Provides the command `lolcatjs`.

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2024-07-15 |
| First published | 2018-07-30 |
| Weekly downloads | 0 |
| License | Hippocratic |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 14 |
| Unpacked size | 43.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | darkobits |
| Maintainers | darkobits |
| Keywords | for, the, lulz |

## Links

- npm: https://www.npmjs.com/package/@darkobits/lolcatjs
- Repository: https://github.com/darkobits/lolcatjs
- Homepage: https://github.com/darkobits/lolcatjs#readme
- Issues: https://github.com/darkobits/lolcatjs/issues
- npm.io page: https://npm.io/package/@darkobits/lolcatjs

## Dependencies (14)

- [ow](https://npm.io/package/ow.md) ^2.0.0
- [ansi](https://npm.io/package/ansi.md) ^0.3.1
- [chalk](https://npm.io/package/chalk.md) ^5.3.0
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [split2](https://npm.io/package/split2.md) ^4.2.0
- [through](https://npm.io/package/through.md) ^2.3.8
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.2.0
- [p-stream](https://npm.io/package/p-stream.md) ^1.0.3
- [async-lock](https://npm.io/package/async-lock.md) ^1.4.1
- [strip-color](https://npm.io/package/strip-color.md) ^0.1.0
- [p-each-series](https://npm.io/package/p-each-series.md) ^3.0.0
- [@darkobits/adeiu](https://npm.io/package/@darkobits/adeiu.md) ^0.4.1
- [@darkobits/sleep](https://npm.io/package/@darkobits/sleep.md) ^3.0.0
- [@darkobits/saffron](https://npm.io/package/@darkobits/saffron.md) ^0.32.17

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 4.0.1 (latest) — 2024-07-15
- 4.0.0 — 2024-07-13
- 3.1.5 — 2021-08-07
- 3.1.4 — 2021-08-07
- 3.1.3 — 2019-06-07
- 3.1.2 — 2019-02-26
- 3.1.1 — 2018-11-27
- 3.1.0 — 2018-09-26
- 3.0.1 — 2018-08-03
- 3.0.0 — 2018-07-30

## README

<p align="center">
  <a
    href="https://www.npmjs.com/package/@darkobits/lolcatjs"
  ><img
    src="https://img.shields.io/npm/v/@darkobits/lolcatjs.svg?style=flat-square"
  ></a>
  <a
    href="https://github.com/darkobits/lolcatjs/actions?query=workflow%3Aci"
  ><img
    src="https://img.shields.io/github/actions/workflow/status/darkobits/lolcatjs/ci.yml?style=flat-square"
  ></a>
  <a
    href="https://depfu.com/repos/github/darkobits/lolcatjs"
  ><img
    src="https://img.shields.io/depfu/darkobits/lolcatjs?style=flat-square"
  ></a>
  <a
    href="https://conventionalcommits.org"
  ><img
    src="https://img.shields.io/static/v1?label=commits&message=conventional&style=flat-square&color=398AFB"
  ></a>
  <a
    href="https://firstdonoharm.dev"
  ><img
    src="https://img.shields.io/static/v1?label=license&message=hippocratic&style=flat-square&color=753065"
  ></a>
</p>
<p align="center">
  <img src="https://user-images.githubusercontent.com/441546/128600690-29ef818e-dd09-4a83-b7e3-2d0c9f6513ca.png">
</p>

> This is a fork of [`lolcatjs`](https://github.com/robertmarsal/lolcatjs), which itself is a Node port
of the [`lolcat`](https://github.com/busyloop/lolcat) Ruby gem.

## Install

```
npm install --global @darkobits/lolcatjs
```

## Use (CLI)

![](https://user-images.githubusercontent.com/441546/46057579-2d15bb00-c10b-11e8-9cb4-d72053db041e.jpg)

## Use (Node)

If you just want to synchronously transform a plain string, use the static `fromString` method on the
`Printer` class:

```js
import Printer from '@darkobits/lolcatjs';
const input = 'The quick brown fox\njumps over the\nlazy dog.';
const transformed = Printer.fromString(input);
```

If you need to do more exotic things, like transform streams and/or files, you'll want to instantiate a
new `Printer`:

```js
import Printer from '@darkobits/lolcatjs';

// Create a new printer.
const printer = new Printer();

// The printer can accept input from strings:
printer.fromString('The quick brown fox jumps over the lazy dog.');

// Or streams (async):
await printer.fromStream(getReadableStreamSomehow());

// Or files (async):
await printer.fromFile('/path/to/muh/file.txt');

// (Or all of the above, in any combination.)

// Output can be read by calling toString():
console.log(printer.toString());

// Or by using the printer in an interpolated string literal:
console.log(`Output: ${printer}`);

// Or, you can pipe it to a writable stream:
printer.stream.pipe(process.stdout);
```

<p align="center">
  <br>
  <img width="22" height="22" src="https://cloud.githubusercontent.com/assets/441546/25318539/db2f4cf2-2845-11e7-8e10-ef97d91cd538.png">
</p>

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