hidden
// usage
randBox.cc_types()
randBox.mersenne_twister()
randBox.mersenne_twister(12345)
randBox.months()
randBox.name_prefixes()
randBox.provinces()
randBox.states()
randBox.street_suffix()
randBox.street_suffixes()
These arenโt really hidden per se, but just utility methods intended to be used internally but exposed externally in case theyโre useful to anyone.
// Return the list of cc types
randBox.cc_types()
=> [{name: "American Express", short_name: 'amex', prefix: '34', length: 15}, ...]
// Return a new Mersenne Twister
randBox.mersenne_twister()
=> [object Object] // An instance of a Mersenne Twister
// Optionally provide a seed for that twister
randBox.mersenne_twister(12345)
=> [object Object] // An instance of a twister with seed 12345
// Return our list of name prefixes
randBox.months();
=> [{name: 'January', short_name 'Jan', numeric: '01'}, ...]
// Return our list of name prefixes
randBox.name_prefixes();
=> [{name: 'Doctor', abbreviation: 'Dr.'}, {name: 'Miss', abbreviation: 'Miss'}, ...]
// Return the list of provinces
randBox.provinces();
=> [{name: 'Alberta', abbreviation: 'AB'}, {name: 'British Columbia', abbreviation: 'BC'}, ...]
// Return the list of states
randBox.states();
=> [{name: 'Alabama', abbreviation: 'AL'}, {name: 'Alaska', abbreviation: 'AK'}, ...]
// Return a random street suffix
randBox.street_suffix();
=> {name: 'Street', abbreviation: 'St'}
// Return the list of street suffixes
randBox.street_suffixes();
=> [{name: 'Avenue', abbreviation: 'Ave'}, {name: 'Boulevard', abbreviation: 'Blvd'}, ...]
Last updated on: