UNPKG

862 BTypeScriptView Raw
1// Type definitions for randomatic 3.1
2// Project: https://github.com/jonschlinkert/randomatic
3// Definitions by: Frelia <https://github.com/execfera>
4// Piotr Błażejewicz <https://github.com/peterblazejewicz>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7/**
8 * Generate randomized strings of a specified length using simple character sequences. The original generate-password.
9 */
10declare function randomatic(pattern: string, length?: number, options?: randomatic.Options): string;
11declare function randomatic(pattern: string, options?: randomatic.Options): string;
12declare function randomatic(length: number): string;
13
14declare namespace randomatic {
15 const isCrypto: boolean;
16
17 interface Options {
18 chars?: string | undefined;
19 exclude?: string | string[] | undefined;
20 }
21}
22
23export = randomatic;