aboutsummaryrefslogtreecommitdiff
path: root/lib/helpers.js
AgeCommit message (Collapse)AuthorFilesLines
2022-01-14chore: remove ts-generated source filesShinigami921-461/+0
2022-01-11chore: format lib without locales (#66)Shinigami1-244/+291
2021-05-28feat: add uniqueArray helper functionHanna Walter1-0/+29
2021-03-03Issue 1114: New datatype moduleLBuerstmayr1-7/+7
Current status: - moved number(), float(), hexaDecimal(), boolean(), uuid() from random to datatype - moved respective test from random.unit to datatype.unit - tests of moved methods in random now check if DeprecationWarning is printed and respective method in datatype module is called - adapted all lib files that use moved methods (mostly number) - adapted tests of respective files to spy on the correct method - adapted README in order to promote usage of method that logs a DeprecationWarning
2020-09-10fix: internet email for japanese and chinese charactersNeto Chaves1-1/+1
2020-09-06fix spelling & formatting mistakesSebastian Pettersson1-4/+4
2020-08-23Merge pull request #614 from mastermatt/bufix-shuffle-last-elementMarak1-3/+10
Bugfix random.shuffle last element.
2020-08-22Fixes default value issue for example pageMarak1-2/+4
2018-10-15Bugfix random.shuffle last element.Matt R. Wilson1-3/+10
There was a bug in the implementation of the modern Fisher–Yates algorithm in that `i` was being decremented prematurely in each loop. This caused the last element of the array to never be swapped and therefore remain the last element. Updated doc to denote the provided array is shuffled in place.
2018-09-24Merge pull request #582 from chilicoder/fix/replaceSymbols-JSdocMarak1-1/+2
Code comments for replaceSymbols extended
2017-11-23Doc for replaceSymbols extendedIaroslav Popov1-1/+2
2017-09-08Merge pull request #303 from shadefinale/masterMarak1-0/+2
[api] [locale] More accurate US/CA phone numbers.
2017-09-08Merge pull request #524 from chilicoder/masterMarak1-0/+2
[api] add alphanumeric symbol * to `helpers.replaceSymbols`
2017-08-10add alphanumeric symbol * to helpers.replaceSymbolsIaroslav Popov1-0/+2
2017-02-26replace String.prototype.repeat with proper helperJakub Mandula1-17/+19
2017-02-26Merge branch 'Mark/origin' into creditCardJakub Mandula1-3/+6
2017-02-10[api] [fix] [minor] Default shuffle value #405Marak1-1/+1
2017-02-09Merge remote-tracking branch 'codemanx/master'Marak1-3/+3
2016-08-30Prevented a crash on running helpers.shuffle on an empty arrayBen Douglas1-0/+3
2016-06-13add String.prototype.repeat in older versions of node - see PR #382Jakub Mandula1-0/+15
2016-06-13add credit card function + helpersJakub Mandula1-0/+93
2016-04-07Add IBAN and BIC generator functionsCoDEmanX1-3/+3
2016-03-03remove Math.random() calls to utilize faker.seed()Ben Southgate1-4/+4
Conflicts: lib/internet.js lib/random.js
2016-03-03Install jsdoc and add doclet stubs for all methodsTobias Witt1-5/+62
Descriptions are taken from existing comments if available. The address module already has some new sample descriptions.
2015-11-11Use faker.random options dict instead of adding 2shadefinale1-1/+1
2015-11-11Edit locales and replaceSymbolwithNumber for more accurate phone numbers.shadefinale1-3/+5
2015-07-08[api] [refactor] Rename `array_element` and `object_element` to camelCase. ↵Marak1-7/+5
Set default max random number to 99999. Added default arguments to some methods.
2015-07-08[refactor] [major] Adds incremental browser builds. Switch to using ↵Marak1-153/+161
prototype for internal API. Previous usage of `module.parent` is not acceptable. Locale information is now passed into Faker constructor. Closes #125
2015-07-07[refactor] [dist] Allow for node to require individual locales ( to avoid ↵Marak1-1/+1
the default behavior of requiring all locale data. #125 #167
2015-07-06[merge] Canadian zip codesMarak1-0/+18
2015-06-04Fix issue Marak/faker.js#214 with shuffle()Sherman Mui1-1/+1
Add a dubious spec.
2015-02-17Implemented proper formatting of Canadian postal codes (remains ↵portse1-0/+18
address.zipCode in the API) when locale is set to en_CA. address.zipCode also now accepts a zip format string, so that a user can specifically specify the format they wish to see. If this is not passed in, a locale based zip format string is used. This will keep the concerns of zipCode formatting specific to the locales.
2014-09-22[api] [minor] Added default values for more methods. Cleaned up image ↵Marak1-1/+1
module. Use a less specific regex for usernames.
2014-09-21[api] Added hacker module. Added default values for all methods. Cleaned up ↵Marak1-1/+15
errant methods. Added mustache helper.
2014-09-16[api] Add ability to generate contextual data for user names and emails. #68Marak1-0/+27
2014-09-15replaced string[index] with charAt - issue 91beastlike1-2/+2
replaced string[index] with charAt; was getting "undefinedundefinedundefinedundefined" when using Faker.PhoneNumber.phoneNumber(); in Internet Explorer 9 (quirks mode)
2014-09-15[api] [refactor] Removed definitions.js file. All data definitions are now ↵Marak1-5/+5
loaded from localized data sets, en is default locale. #116
2014-09-14[refactor] [major] Renamed variable names for consistency Closes #5 Marak1-49/+49
[refactor [major] Moved all errant methods from random.js to individual modules. Methods in random.js were causing unnecessary code complication.
2014-09-13[api] Added basic financial generators Closes #32Marak1-1/+13
Merge https://github.com/josefsalyer/Faker.js
2014-09-11[api] [refactor] Replaced Math.Random calls with Random.number. Random ↵Marak1-2/+2
ranges are now inclusive of max instead of exclusive. #88 #48
2014-05-17Moving to major new version for change of package name for uppercase to ↵FotoVerite1-47/+47
lowercase.
2013-07-28added tests and cleaned up at 100% in istanbul (not constantinople)Josef Salyer1-1/+1
2013-07-28added a bunch of test, changed format of many files to match the newer styleJosef Salyer1-101/+104
2013-03-16fix #35: Add latitude/longitude fields (address.geo.[lat/lng])Mikhail Fedosov1-2/+10
2013-03-15fix #42: Email has invalid charactersMikhail Fedosov1-0/+5
2013-01-08adding randomNumber and randomize back to helpers.jsBryan Donovan1-0/+10
2013-01-07100% test coverage.Bryan Donovan1-10/+2
2013-01-07phone number testsBryan Donovan1-4/+0
2013-01-07namespacing with 'Faker'Bryan Donovan1-4/+3
2013-01-06initial address.unit.jsBryan Donovan1-6/+3