lorem-ipsum

  • Version 2.0.4
  • Published
  • 131 kB
  • 1 dependency
  • ISC license

Install

npm i lorem-ipsum
yarn add lorem-ipsum
pnpm add lorem-ipsum

Overview

Generates passages of lorem ipsum text suitable for use as placeholder copy in web pages, graphics, and more. Works in the browser, NodeJS, and React Native.

Index

Functions

function loremIpsum

loremIpsum: ({
count,
format,
paragraphLowerBound,
paragraphUpperBound,
random,
sentenceLowerBound,
sentenceUpperBound,
units,
words,
suffix,
}?: ILoremIpsumParams) => string;

    Classes

    class LoremIpsum

    class LoremIpsum {}

      constructor

      constructor(options?: IGeneratorOptions, format?: LoremFormat, suffix?: string);

        property format

        format: LoremFormat;

          property generator

          generator: Generator;

            property suffix

            suffix?: string;

              method formatString

              formatString: (str: string) => string;

                method formatStrings

                formatStrings: (strings: string[]) => string[];

                  method generateParagraphs

                  generateParagraphs: (num: number) => string;

                    method generateSentences

                    generateSentences: (num?: number) => string;

                      method generateWords

                      generateWords: (num?: number) => string;

                        method getLineEnding

                        getLineEnding: () => string;

                          Interfaces

                          interface ILoremIpsumParams

                          interface ILoremIpsumParams {}

                            property count

                            count?: number;

                              property format

                              format?: LoremFormat;

                                property paragraphLowerBound

                                paragraphLowerBound?: number;

                                  property paragraphUpperBound

                                  paragraphUpperBound?: number;

                                    property random

                                    random?: IPrng;

                                      property sentenceLowerBound

                                      sentenceLowerBound?: number;

                                        property sentenceUpperBound

                                        sentenceUpperBound?: number;

                                          property suffix

                                          suffix?: string;

                                            property units

                                            units?: LoremUnit;

                                              property words

                                              words?: string[];

                                                Namespaces

                                                namespace nock-exec

                                                module 'nock-exec' {}

                                                  function nockExec

                                                  nockExec: (command: string) => any;

                                                    Package Files (3)

                                                    Dependencies (1)

                                                    Dev Dependencies (20)

                                                    Peer Dependencies (0)

                                                    No peer dependencies.

                                                    Badge

                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/lorem-ipsum.

                                                    • Markdown
                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/lorem-ipsum)
                                                    • HTML
                                                      <a href="https://www.jsdocs.io/package/lorem-ipsum"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>