blurbinator
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Blurbinator

Generate placeholder text that looks like this:

▇▇ ▇▇▇ ▇▇▇ ▇▇ ▇▇. ▇▇▇ ▇▇▇▇ ▇▇▇▇▇ ▇▇▇▇▇ ▇▇▇▇▇ ▇▇ ▇▇▇▇ ▇ ▇. ▇▇▇ ▇▇▇▇▇ ▇ ▇▇▇▇▇ ▇▇▇▇ ▇▇▇▇ ▇. ▇ ▇▇ ▇▇▇▇ ▇▇▇ ▇▇▇▇▇ ▇▇▇▇ ▇▇▇▇▇ ▇▇▇▇▇ ▇▇▇▇ ▇▇▇ ▇▇ ▇▇▇▇▇ ▇▇▇ ▇. ▇▇▇ ▇▇▇ ▇ ▇▇▇▇▇ ▇ ▇▇▇▇ ▇▇ ▇▇ ▇▇▇▇ ▇▇▇▇▇ ▇▇ ▇▇▇▇ ▇▇▇▇▇. ▇▇ ▇▇▇▇▇ ▇▇▇▇ ▇▇▇ ▇▇▇▇▇ ▇ ▇▇▇▇ ▇▇▇ ▇▇▇ ▇ ▇▇▇▇.

▇▇▇▇▇ ▇▇▇ ▇▇▇▇ ▇▇▇ ▇▇▇▇▇. ▇▇ ▇▇▇▇ ▇ ▇▇ ▇▇▇▇▇ ▇▇▇ ▇▇▇. ▇▇▇▇▇ ▇▇▇▇ ▇ ▇▇▇ ▇▇ ▇▇ ▇▇▇▇▇. ▇▇▇▇ ▇▇▇ ▇▇ ▇▇▇ ▇▇ ▇▇▇.

It's pretty cute.

Quick Start

  1. Install

    npm install blurbinator
  2. Usage

    import { blurb, BlurbOptions } from "blurbinator";
    
    const options: BlurbOptions = { stubChar: "a" };
    blurb(options); // e.g. Generated: aaa aa aaaa a aa.

Quick Guide

export interface BlurbOptions<T> {
  /** RNG that outputs [0-1) */
  random?: () => number;
  /** Number of paragraphs to generate. */
  paragraphs?: [number, number];
  /** If set, preprocess the outputted paragraph array. */
  paragraphsConcat?: (arr: string[]) => T;
  /** Number of sentences per paragraph. */
  sentences?: [number, number];
  /** Number of words per sentence. */
  words?: [number, number];
  /** Number of characters in a word. */
  wordLen?: [number, number];
  /** Placeholder character. */
  stubChar?: string;
}

Readme

Keywords

none

Package Sidebar

Install

npm i blurbinator

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

13.4 kB

Total Files

7

Last publish

Collaborators

  • nmcapule