Skip to content
SPECIFICTION
Get listed

Chance.js vs Fishery

Chance.js

chancejs.com

Fishery

github.com

Side by side

FigureChance.jsFishery
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYes—
APIYes—
Plans published11
Spec score · Test Data Generation Tools8.3 (#2)7.7 (#11)
LicenseChance is open source and released under the MIT License.The README describes Fishery as free software and links to its license.
PurposeChance generates pseudo-random strings, numbers, and other values for automated tests and other uses that need random data.Fishery is a JavaScript library for setting up objects for tests and other data needs.

Plans

Chance.js

  • Chance.jsFree

Chance.js pricing →

Fishery

  • FreeFree

Fishery pricing →

In their own words

Chance.js

Chance.js is a free, MIT-licensed JavaScript library for generating pseudorandom data used in automated tests and other applications needing sample values. Generators cover basic values, text, people, mobile identifiers, web data, locations, dates, finance, helpers, and miscellaneous categories. Developers can install it with npm for Node.js, load it in a browser, or use the separate chance-cli package from the command line. Browser users may create a global instance or instantiate several instances. Supplying a seed makes output repeatable; instances given the same seed can produce the same sequence. Integer generation accepts inclusive minimum and maximum bounds, and the unique() helper builds arrays without repeated generated items. The documented name generator supports English and Italian nationality options. The site lists chance.js at 95KB uncompressed and chance.min.js at 55KB, or 17KB gzipped. Chance is not intended for cryptographic applications requiring true randomness. The site credits Victor Quinn as its writer.

Visit chancejs.com

Fishery

Fishery is a free JavaScript library for preparing objects as test data and for other situations where JavaScript data needs setup. Its factories define defaults, and build() creates objects with supplied parameters layered over those defaults. TypeScript users can obtain typed factory parameters and return objects, while the library also works without TypeScript. Factories may define onCreate behavior for asynchronous work; create() then performs that work and returns a promise. Additional factory capabilities include sequences, transient parameters, associations, and hooks that run after building or creating objects. Developers can extend factories with reusable builder methods by subclassing Factory. The documentation describes using factories alongside other factories to build associated objects. Installation instructions cover npm and Yarn as development dependencies. The repository identifies Fishery as free software under the MIT license and says thoughtbot, inc. maintains and funds it. GitHub Issues is the listed channel for bug reports and change requests.

Visit github.com