aboutsummaryrefslogtreecommitdiff
path: root/lib/random.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/random.js')
-rw-r--r--lib/random.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/random.js b/lib/random.js
index b152ddbd..d3cbf3ea 100644
--- a/lib/random.js
+++ b/lib/random.js
@@ -189,6 +189,15 @@ function Random (faker, seed) {
return faker.random.arrayElement(Object.keys(faker.locales));
};
+ /**
+ * alphaNumeric
+ *
+ * @method faker.random.alphaNumeric
+ */
+ this.alphaNumeric = function alphaNumeric() {
+ return faker.random.arrayElement(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]);
+ }
+
return this;
}