1.0.1 • Published 3 years ago

blurbinator v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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;
}
1.0.1

3 years ago

1.0.0

3 years ago