Meta tags:
description= Generate massive amounts of fake (but reasonable) data for testing and development.;
Headings (most frequently used words):
examples, source, distributors, guide, api, contributing, about, exponentialdistributor, uniformdistributor, modules, announcements, roadmap, parameters,
Text of the page (most frequently used words):
the (43), #distributor (36), faker (23), randomizer (22), number (19), values (16), base (15), bias (11), distribution (9), function (8), uniform (8), more (8), will (8), int (8), max (7), min (7), const (6), result (6), value (6), exponentialdistributor (6), options (6), uniformdistributor (5), generated (5), using (5), likely (5), closer (5), functions (5), are (5), next (4), source (4), generatemersenne53randomizer (4), from (4), v10 (4), that (4), can (4), exponential (4), alwaysmin (4), 2022 (3), page (3), import (3), examples (3), following (3), table (3), shows (3), rough (3), distributed (3), this (3), distributors (3), utilities (2), view (2), returns (2), available (2), since (2), creates (2), new (2), generates (2), uniformly (2), likelihood (2), same (2), zero (2), higher (2), maximum (2), lower (2), minimum (2), generate (2), alternatively (2), configured (2), option (2), type (2), used (2), and (2), results (2), limited (2), team (2), roadmap (2), announcements (2), about (2), api (2), guide (2), navigation (2), open (2), collective (2), copyright, present, released, under, mit, license, previous, pager, 017890944117802343, 28282249581185814, 14770035310214324, 791632947887336, 9100215692561207, each, 3476359433171099, 5164955927828387, 4202905589842396, 13436127925491848, 04643770898904198, alternative, way, specify, also, accepts, below, positive, negative, should, greater, than, above, for, generating, description, default, name, parameters, power, law, exponentially, uses, spread, please, note, processed, further, accepting, within, call, some, such, float, biased, towards, depending, normal, close, specific, all, have, common, determines, considered, change, many, collected, form, between, resemble, continue, cleanup, improvements, make, handier, tree, shakeable, module, 2024, submit, pull, request, set, development, environment, propose, feature, report, bugs, code, conduct, contributing, word, vehicle, system, string, science, phone, person, music, lorem, location, internet, image, helpers, hacker, git, food, finance, date, datatype, database, company, commerce, color, book, animal, airline, modules, simplefaker, overview, upgrading, unique, frameworks, localization, usage, getting, started, sidebar, return, top, menu, appearance, release, notes, browser, console, stackblitz, try, main, ctrl, search, skip, content,
Text of the page (random words):
distributors faker skip to content faker search ctrl k main navigation guide api try it stackblitz browser console about announcements roadmap team v10 5 0 release notes next v9 9 0 v8 4 1 v7 6 0 v6 3 1 open collective appearance open collective menu return to top sidebar navigation guide getting started usage localization frameworks randomizer unique values upgrading to v10 api overview faker simplefaker randomizer distributors utilities modules airline animal book color commerce company database datatype date finance food git hacker helpers image internet location lorem music number person phone science string system vehicle word contributing code of conduct report bugs propose a feature set up a development environment submit a pull request about announcements 2024 10 26 2022 09 08 2022 01 14 roadmap v9 tree shakeable module functions v8 make faker handier v7 cleanup improvements v6 continue faker team on this page distributors a function that determines the distribution of generated values values generated by a randomizer are considered uniformly distributed distributor functions can be used to change this if many results are collected the results form a limited distribution between 0 and 1 so an exponential distributor s values will resemble a limited exponential distribution common examples of distributor functions are uniform distributor all values have the same likelihood normal distributor values are more likely to be close to a specific value exponential distributor values are biased towards 0 1 depending on options distributor functions can be used by some faker functions such as faker number int and faker number float please note that the result from the distributor function is processed further by the function accepting it e g a distributor result of 0 5 within a call to faker number int min 10 max 20 will result in 15 ts type distributor randomizer randomizer number ts import distributor randomizer faker from faker js faker const alwaysmin distributor 0 faker number int min 2 max 10 distributor alwaysmin 2 faker number int min 2 max 10 distributor alwaysmin 2 faker number int min 2 max 10 distributor alwaysmin 2 const uniform distributor randomizer randomizer randomizer next faker number int min 0 max 10 distributor uniform 5 faker number int min 0 max 10 distributor uniform 2 faker number int min 0 max 10 distributor uniform 9 exponentialdistributor creates a new function that generates power law exponentially distributed values this function uses base next 1 base 1 to spread the values the following table shows the rough distribution of values generated using exponentialdistributor base x result base 0 1 base 0 5 base 1 base 2 base 10 0 0 0 1 4 1 7 4 10 0 13 8 27 8 0 1 0 2 4 5 7 8 10 0 12 5 16 9 0 2 0 3 5 0 8 2 10 0 11 5 12 1 0 3 0 4 5 7 8 7 10 0 10 7 9 4 0 4 0 5 6 6 9 3 10 0 10 0 7 8 0 5 0 6 7 8 9 9 10 0 9 3 6 6 0 6 0 7 9 4 10 7 10 0 8 8 5 7 0 7 0 8 12 1 11 5 10 0 8 2 5 0 0 8 0 9 16 9 12 6 10 0 7 8 4 5 0 9 1 0 27 9 13 8 10 0 7 5 4 1 the following table shows the rough distribution of values generated using exponentialdistributor bias x result bias 9 bias 1 bias 0 bias 1 bias 9 0 0 0 1 27 9 13 7 10 0 7 4 4 1 0 1 0 2 16 9 12 5 10 0 7 8 4 5 0 2 0 3 12 1 11 6 10 0 8 3 5 1 0 3 0 4 9 5 10 7 10 0 8 8 5 7 0 4 0 5 7 8 10 0 10 0 9 3 6 6 0 5 0 6 6 6 9 3 10 0 9 9 7 7 0 6 0 7 5 7 8 8 10 0 10 7 9 5 0 7 0 8 5 0 8 2 10 0 11 5 12 1 0 8 0 9 4 5 7 8 10 0 12 6 16 8 0 9 1 0 4 1 7 4 10 0 13 7 27 9 available since v10 5 0 parameters name type default description options the options for generating the distributor options base number 2 the base of the exponential distribution should be greater than 0 the higher more above 1 the base the more likely the number will be closer to the minimum value the lower closer to zero the base the more likely the number will be closer to the maximum value values of 1 will generate a uniform distribution can alternatively be configured using the bias option options bias number 1 an alternative way to specify the base also accepts values below zero the higher more positive the bias the more likely the number will be closer to the maximum value the lower more negative the bias the more likely the number will be closer to the minimum value values of 0 will generate a uniform distribution can alternatively be configured using the base option returns distributor ts function exponentialdistributor options base number bias number distributor examples ts import exponentialdistributor generatemersenne53randomizer from faker js faker const randomizer generatemersenne53randomizer const distributor exponentialdistributor distributor randomizer 0 04643770898904198 distributor randomizer 0 13436127925491848 distributor randomizer 0 4202905589842396 distributor randomizer 0 5164955927828387 distributor randomizer 0 3476359433171099 source view source uniformdistributor creates a new function that generates uniformly distributed values the likelihood of each value is the same the following table shows the rough distribution of values generated using uniformdistributor result uniform 0 0 0 1 10 0 0 1 0 2 10 0 0 2 0 3 10 0 0 3 0 4 10 0 0 4 0 5 10 0 0 5 0 6 10 0 0 6 0 7 10 0 0 7 0 8 10 0 0 8 0 9 10 0 0 9 1 0 10 0 available since v10 5 0 returns distributor ts function uniformdistributor distributor examples ts import generatemersenne53randomizer uniformdistributor from faker js faker const randomizer generatemersenne53randomizer const distributor uniformdistributor distributor randomizer 0 9100215692561207 distributor randomizer 0 791632947887336 distributor randomizer 0 14770035310214324 distributor randomizer 0 28282249581185814 distributor randomizer 0 017890944117802343 source view source pager previous page randomizer next page utilities released under the mit license copyright 2022 present faker
|