This document describes notable changes to this project, which adheres to Semantic Versioning.
-
The documentation for
chance.core.fromSet()now correctly says that thekeyparameter can only be a string. The parameter cannot be a function as the documentation erroneously said. -
The documentation for
chance.person.gender()now correctly referenceschance.core.dataSets.
-
The
HelperAPI:chance.helpers.pick_unique()
-
The
PersonAPIchance.ssn()
-
The
PokerAPI:chance.poker.card()chance.poker.deck()chance.poker.hand()
-
All API functions now belong to sub-tables named after their "section" or group. For example,
chance.random()is nowchance.core.random(),chance.bool()is now namedchance.basic.bool(), and so on. -
Both
chance.luaandchance.spec.luanow have form feed characters that divide up the sections into "pages".
- The
MiscellaneousAPI:chance.normal()chance.weighted()
- Improved the documentation for
chance.url()
chance.day()now always returns the correct values when using the optionalweekdaysorweekendsflags.
-
The
TextAPI:chance.syllable()chance.word()chance.sentence()chance.paragraph()
-
The
MiscellaneousAPI:chance.unique()chance.hash()
-
The
WebAPI:chance.tld()chance.domain()chance.email()chance.hashtag()chance.twitter()chance.uri()andchance.url()chance.color()chance.ip()chance.ipv6()
-
The Test Suite:
- The
unique_array()assertion - The
like_pattern()assertion
- The
-
Internal Utilities that are not part of the public API:
makeStringFrom()
-
is_within_range()is now simplywithin_range(), which makes it more flexible for use in assertions. -
The input to
chance.rpg()is case-insensitive, so one can write bothchance.rpg("3d6")andchance.rpg("3D6"). -
chance.day()accepts both boolean true and false values for the optionalweekdaysandweekendsflags.
-
The
CoreAPI:- Defining, modifying, and selecting from named data sets
chance.dataSetschance.set()chance.fromSet()chance.appendSet()
-
The
PersonAPI:chance.gender()chance.age()chance.prefix()chance.suffix()
- The following functions now randomly select from data sets:
chance.month()selects from"months"chance.day()selects from"days"
-
A basic test suite.
-
The
CoreAPI:chance.VERSIONchance.seed()chance.random()
-
The
BasicAPI:chance.bool()chance.float()chance.integer()chance.natural()chance.character()
-
The
TimeAPI:chance.hour()chance.minute()chance.second()chance.millisecond()chance.ampm()chance.year()chance.month()chance.timestamp()chance.day()
-
The
HelperAPI:chance.pick()change.shuffle()
-
The
MiscellaneousAPI:chance.rpg()chance.d4()chance.d6()chance.d8()chance.d10()chance.d12()chance.d20()chance.d100()chance.n()