aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2024-11-12 09:19:28 +0100
committerGitHub <[email protected]>2024-11-12 08:19:28 +0000
commit1633c8deb8f6f41151b39b62689ae3e02ab295bc (patch)
tree2561a719b9154d67c51747a2263f68baf4ff8efa /src/internal
parentcb4b77c04f4d4a706819a6f34ff8378afec6523e (diff)
downloadfaker-1633c8deb8f6f41151b39b62689ae3e02ab295bc.tar.xz
faker-1633c8deb8f6f41151b39b62689ae3e02ab295bc.zip
feat: add initial seed parameter to constructors (#3220)
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/seed.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/internal/seed.ts b/src/internal/seed.ts
new file mode 100644
index 00000000..3ff484b2
--- /dev/null
+++ b/src/internal/seed.ts
@@ -0,0 +1,8 @@
+/**
+ * Generates a random seed.
+ *
+ * @internal
+ */
+export function randomSeed(): number {
+ return Math.ceil(Math.random() * Number.MAX_SAFE_INTEGER);
+}