aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/datatype.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/datatype.js b/lib/datatype.js
index 02ea3759..63ebd65c 100644
--- a/lib/datatype.js
+++ b/lib/datatype.js
@@ -220,6 +220,20 @@ function Datatype (faker, seed) {
};
+ /**
+ * returns a Big Integer with values generated by faker.datatype.bigInt
+ * @method faker.datatype.bigInt
+ * @param { number } value
+ */
+
+ this.bigInt = function bigInt(value) {
+ if(value === undefined){
+ value = Math.floor(Math.random() * 99999999999) + 10000000000;
+ }
+
+ return BigInt(value);
+ };
+
return this;
}