@travi/any
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -8,59 +8,41 @@ import IntegerOptions = Chance.IntegerOptions; | ||
declare function simpleObject(): Record<string, string>; | ||
declare interface Any { | ||
simpleObject(): Record<string, string>; | ||
declare function objectWithKeys<T extends string, F, R = string>( | ||
keys: T[], | ||
options?: { factory?: F } | ||
): Record<T, F extends (...args: any) => any ? ReturnType<F> : R>; | ||
objectWithKeys<T extends string, F, R = string>( | ||
keys: T[], | ||
options?: { factory?: F } | ||
): Record<T, F extends (...args: any) => any ? ReturnType<F> : R>; | ||
declare function fromList<T extends unknown>(list: T[]): T; | ||
fromList<T extends unknown>(list: T[]): T; | ||
declare function subList<T extends unknown>(list: T[], options?: { size: number }): T[]; | ||
subList<T extends unknown>(list: T[], options?: { size: number }): T[]; | ||
declare function listOf<F extends (...args: any) => any, T = ReturnType<F>>( | ||
factory: F, | ||
options?: { size?: number; uniqueOn?: string } & Parameters<typeof integer>[0] | ||
): T[]; | ||
listOf<F extends (...args: any) => any, T = ReturnType<F>>( | ||
factory: F, | ||
options?: { size?: number; uniqueOn?: string } & Parameters<typeof Any['integer']>[0] | ||
): T[]; | ||
declare function string(options?: Partial<StringOptions>): string; | ||
string(options?: Partial<StringOptions>): string; | ||
declare function word(options?: Partial<WordOptions>): string; | ||
word(options?: Partial<WordOptions>): string; | ||
declare function sentence(options?: Partial<SentenceOptions>): string; | ||
sentence(options?: Partial<SentenceOptions>): string; | ||
declare function paragraph(options?: { sentences?: number }): string; | ||
paragraph(options?: { sentences?: number }): string; | ||
integer(options?: Partial<IntegerOptions>): number; | ||
declare function integer(options?: Partial<IntegerOptions>): number; | ||
float(options?: Partial<IntegerOptions> & { fixed?: number }): number; | ||
declare function float(options?: Partial<IntegerOptions> & { fixed?: number }): number; | ||
boolean(options?: { likelihood?: number }): boolean; | ||
declare function boolean(options?: { likelihood?: number }): boolean; | ||
url(options?: Partial<UrlOptions>): string; | ||
declare function url(options?: Partial<UrlOptions>): string; | ||
email(options?: Partial<EmailOptions>): string; | ||
declare function email(options?: Partial<EmailOptions>): string; | ||
declare function date(): string; | ||
declare interface Any { | ||
simpleObject: typeof simpleObject, | ||
objectWithKeys: typeof objectWithKeys, | ||
fromList: typeof fromList, | ||
subList: typeof subList, | ||
listOf: typeof listOf, | ||
string: typeof string, | ||
word: typeof word, | ||
sentence: typeof sentence, | ||
paragraph: typeof paragraph, | ||
integer: typeof integer, | ||
float: typeof float, | ||
boolean: typeof boolean, | ||
url: typeof url, | ||
email: typeof email, | ||
date: typeof date, | ||
date(): string; | ||
} | ||
declare const Any: Any; | ||
export default Any; |
{ | ||
"name": "@travi/any", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "random data generator for when test data is insignificant", | ||
@@ -90,3 +90,3 @@ "main": "lib/any.cjs.js", | ||
"rimraf": "3.0.2", | ||
"rollup": "2.75.5", | ||
"rollup": "2.75.6", | ||
"rollup-plugin-auto-external": "2.0.0", | ||
@@ -93,0 +93,0 @@ "rollup-plugin-babel": "4.4.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49429
345