From a four-line schema to a record, step by step
The easiest way to see what the generator does is to follow one record through it. Here is a small schema for a list of users, four lines long: "name: fullName", "email: email", "age: int(18, 90)" and "score: float(0, 5, 1)". Ask for one record and you might get this: {"name": "Priya Okafor", "email": "priya.okafor@example.org", "age": 37, "score": 4.2}. Every part of that record follows a rule you can check.
The name comes first. The generator picks a first name and a last name at random from two short bundled lists, here Priya and Okafor, before it looks at any field. That matters for the next line. The email type does not invent a new person; it reuses the same record’s first and last name, lower-cased and joined with a dot. About half the time it adds a number from 50 to 99, as people do when their plain name is taken. Then it picks one of three domains: example.com, example.org or example.net. Those three are reserved by RFC 2606 so that documentation and tests can use them safely. Fake data has a way of escaping into staging systems that really send mail, and this guarantees the mail goes nowhere.
The age line asks for a whole number from 18 to 90. Both ends count, so there are 73 possible values: 90 minus 18 is 72, plus one for the end. The generator draws one of those 73 with equal chance. It uses crypto.getRandomValues and throws away any random value that would make some ages more likely than others, so 18 and 90 come up exactly as often as 37. A common shortcut, Math.floor(Math.random() * 72) + 18, quietly never produces 90 at all, which is the kind of bug that only shows up when a test needs the edge.
The score line asks for a decimal from 0 to 5 with one decimal place. The generator works in steps of 0.1: it multiplies the range by 10, so 0 to 5 becomes 0 to 50, draws one of those 51 whole numbers, and divides by 10 again. The result is always a clean value like 4.2 or 5, never 4.2000000001, and 0.0 and 5.0 are as likely as anything in between. With a third argument of 2 you would get 501 steps of 0.01 instead.
Now ask for 1,000 records and the same thing happens 1,000 times, each record independent of the others, then the whole array is written as indented JSON. A schema error stops the run before anything is made, with the line number and the reason: a type spelled wrong, a range written backwards, or the same field name used twice.
The limits are deliberate. Records are flat, so there are no nested objects or arrays. The name and city lists are small, so a large set repeats them. Values are spread evenly, which is right for testing edges but wrong for anything that needs real-world distributions. And there is no seed, so each run is different; when a test needs fixed data, download the file once and keep it.