diff options
| author | LBuerstmayr <[email protected]> | 2021-03-01 21:00:50 +0100 |
|---|---|---|
| committer | Marak <[email protected]> | 2021-03-03 20:14:45 -0500 |
| commit | 58c61afb1b8baa160add593e5af7c110de011968 (patch) | |
| tree | 4cc8174e0809bc186ec833b85b5babeecce577a4 /lib/random.js | |
| parent | 36d8644d95fc4c99af5c80e120d97678a3f0ced5 (diff) | |
| download | faker-58c61afb1b8baa160add593e5af7c110de011968.tar.xz faker-58c61afb1b8baa160add593e5af7c110de011968.zip | |
WIP: issue-1114-datatypes-module
Diffstat (limited to 'lib/random.js')
| -rw-r--r-- | lib/random.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/random.js b/lib/random.js index f815c94f..5c585236 100644 --- a/lib/random.js +++ b/lib/random.js @@ -333,16 +333,8 @@ function Random (faker, seed) { * @param {number} count defaults to 1 */ this.hexaDecimal = function hexaDecimal(count) { - if (typeof count === "undefined") { - count = 1; - } - - var wholeString = ""; - for(var i = 0; i < count; i++) { - wholeString += faker.random.arrayElement(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); - } - - return "0x"+wholeString; + console.log("DeprecationWarning: Method is now located in faker.datatype.hexaDecimal"); + return faker.datatype.hexaDecimal(count); }; return this; |
