aboutsummaryrefslogtreecommitdiff
path: root/lib/datatype.js
AgeCommit message (Collapse)AuthorFilesLines
2022-01-14chore: remove ts-generated source filesShinigami921-263/+0
2022-01-11chore: format lib without locales (#66)Shinigami1-240/+263
2022-01-09fix(tests): fix failing tests (#12)Mateus Dadalto1-1/+1
Co-authored-by: Shinigami <[email protected]>
2021-09-11rebuild bigInt generator pull requestEdwin Samodra1-0/+14
2021-03-24Give each faker instance its own random number generatorCharles Lowell1-5/+3
Currently, every Faker instance shares the same random number generator instance which means that to seed one faker instance is to seed them all. This can result in duplicate data being generated all over the place. This just extracts the public API of the mersenne twister found in `vendor/mersenne.js` and creates a single instance of it per faker. This implementation is a tad sub-optimal since calling `seed()` on a faker instance will result in two redundant calls to `mersenne.init_genrand()`: one in `random.js` and the other in `datatype.js`. It would probably be more DRY to create the mersenne instance once in faker and then pass it into to the `Random` and `Datatype` instances, however, this takes the strategy of the smallest possible API change.
2021-03-22Linting fixes for `./lib`Marak1-140/+140
2021-03-03Updates deprecation messageMarak1-1/+1
Fixes typo is jsdoc
2021-03-03Issue 1114: new datatypes modulelbuerste1-1/+1
Current status: - renamed method to datetime
2021-03-03Issue 1114: new datatypes modulelbuerste1-3/+2
Current status: - changed datetime test that checks seeding to not assert something because it does not work - changed some asserts to strictEqual instead of using .ok(a===b) - renamed datatype.date to datatype.datetime
2021-03-03Issue 1114: new datatypes modulelbuerste1-33/+57
Current status: - implemented array method and respective tests - added a few semicolons - changed test with seeding of datatype.date to only check date, not time - added test for generating json with set seed
2021-03-03Issue 1114: New datatype moduleLBuerstmayr1-13/+60
Current status: - adding methods for string, json and respective tests
2021-03-03Issue 1114: new datatypes modulelbuerste1-2/+20
Current status: - moved tests with seeding problem back to random.unit - implemented date method - added datatype module to seed funtion - added tests for date method
2021-03-03Issue 1114: New datatype moduleLBuerstmayr1-61/+17
Current status: - moved number(), float(), hexaDecimal(), boolean(), uuid() from random to datatype - moved respective test from random.unit to datatype.unit - tests of moved methods in random now check if DeprecationWarning is printed and respective method in datatype module is called - adapted all lib files that use moved methods (mostly number) - adapted tests of respective files to spy on the correct method - adapted README in order to promote usage of method that logs a DeprecationWarning
2021-03-03WIP: issue-1114-datatypes-moduleLBuerstmayr1-0/+184