1.2.0 • Published 5 months ago
@types/random-words v1.2.0
Installation
npm install --save @types/random-words
Summary
This package contains type definitions for random-words (https://github.com/punkave/random-words#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/random-words.
index.d.ts
// Type definitions for random-words 1.1
// Project: https://github.com/punkave/random-words#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* generates random words for use as sample text.
* We use it to generate random blog posts when testing Apostrophe.
*/
declare function words(
options?: words.Options & {
join: string;
},
): string;
declare function words(options: words.Options | number): string[];
declare namespace words {
const wordList: string[];
interface Options {
exactly?: number | undefined;
formatter?: WordFormatter | undefined;
join?: string | undefined;
max?: number | undefined;
maxLength?: number | undefined;
min?: number | undefined;
separator?: string | undefined;
wordsPerString?: number | undefined;
}
type WordFormatter = (word: string, relativeIndex?: number) => string;
}
export = words;
Additional Details
- Last updated: Thu, 08 Jul 2021 20:20:15 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Piotr Błażejewicz.