aboutsummaryrefslogtreecommitdiff
path: root/src/modules/number
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2023-03-29 20:36:46 +0700
committerGitHub <[email protected]>2023-03-29 13:36:46 +0000
commit3562e872530b3610d95be71aa6f4f7fdfef7134f (patch)
treec6ba28a9f3cf30e5bf5c0a935fead6bdb2668531 /src/modules/number
parent88e561a5490003a41665eb007c5c28ff0800ae09 (diff)
downloadfaker-3562e872530b3610d95be71aa6f4f7fdfef7134f.tar.xz
faker-3562e872530b3610d95be71aa6f4f7fdfef7134f.zip
docs: add overview guides to specific modules (#1929)
Diffstat (limited to 'src/modules/number')
-rw-r--r--src/modules/number/index.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/number/index.ts b/src/modules/number/index.ts
index 3cd35f40..1e3ed363 100644
--- a/src/modules/number/index.ts
+++ b/src/modules/number/index.ts
@@ -4,6 +4,17 @@ import type { Mersenne } from '../../internal/mersenne/mersenne';
/**
* Module to generate numbers of any kind.
+ *
+ * ### Overview
+ *
+ * For simple integers, use [`int()`](https://next.fakerjs.dev/api/number.html#int). For decimal/floating-point numbers, use [`float()`](https://next.fakerjs.dev/api/number.html#float).
+ *
+ * For numbers not in base-10, you can use [`hex()`](https://next.fakerjs.dev/api/number.html#hex), [`octal()`](https://next.fakerjs.dev/api/number.html#octal) and [`binary()`](https://next.fakerjs.dev/api/number.html#binary)`.
+ *
+ * ### Related modules
+ *
+ * - For numeric strings of a given length, use [`faker.string.numeric()`](https://next.fakerjs.dev/api/string.html#numeric).
+ * - For credit card numbers, use [`faker.finance.creditCardNumber()`](https://next.fakerjs.dev/api/finance.html#creditcardnumber).
*/
export class NumberModule {
constructor(private readonly faker: Faker) {