bs-faker
Advanced tools
Comparing version 0.7.0 to 1.0.0
@@ -6,19 +6,21 @@ // This is the configuration file used by BuckleScript's build system bsb. Its documentation lives here: http://bucklescript.github.io/bucklescript/docson/#build-schema.json | ||
"version": "0.3.1", | ||
"sources": [{ | ||
"dir" : "src", | ||
}, { | ||
"dir": "__tests__", | ||
"type": "dev" | ||
}], | ||
"namespace": true, | ||
"sources": [ | ||
{ | ||
"dir": "src" | ||
}, | ||
{ | ||
"dir": "__tests__", | ||
"type": "dev" | ||
} | ||
], | ||
"bs-dependencies": [ | ||
// add your dependencies here. You'd usually install them normally through `npm install my-dependency`. If my-dependency has a bsconfig.json too, then everything will work seamlessly. | ||
// add your dependencies here. You'd usually install them normally through `npm install my-dependency`. If my-dependency has a bsconfig.json too, then everything will work seamlessly. | ||
], | ||
"suffix": ".bs.js", | ||
"bs-dev-dependencies": [ | ||
"@glennsl/bs-jest" | ||
], | ||
"bs-dev-dependencies": ["@glennsl/bs-jest"], | ||
"warnings": { | ||
"error" : "+101" | ||
"error": "+101" | ||
}, | ||
"refmt": 3 | ||
} |
{ | ||
"name": "bs-faker", | ||
"version": "0.7.0", | ||
"version": "1.0.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "bsb -make-world", |
230
README.md
@@ -1,2 +0,3 @@ | ||
# bs-faker [![Build Status](https://travis-ci.org/Schniz/bs-faker.svg?branch=master)](https://travis-ci.org/Schniz/bs-faker) ![BuckleScript binding coverage](https://img.shields.io/badge/binding%20coverage-72%2F148-red.svg) | ||
# bs-faker [![Build Status](https://travis-ci.org/Schniz/bs-faker.svg?branch=master)](https://travis-ci.org/Schniz/bs-faker) ![BuckleScript binding coverage](https://img.shields.io/badge/binding%20coverage-103%2F148-yellowgreen.svg) | ||
> [Faker.js](https://github.com/marak/Faker.js/) bindings for [BuckleScript](https://github.com/bloomberg/bucklescript) in [Reason](https://github.com/facebook/reason) | ||
@@ -10,8 +11,13 @@ | ||
Then add `bs-faker` as a dependency to `bsconfig.json` | ||
Then add `bs-faker` as a dependency to `bsconfig.json`: | ||
# Usage | ||
```diff | ||
... | ||
"bs-dependencies": [ | ||
// add your dependencies here. You'd usually install them normally through `npm install my-dependency`. If my-dependency has a bsconfig.json too, then everything will work seamlessly. | ||
+ "bs-faker" | ||
] | ||
... | ||
``` | ||
Don't hesitate to view the interface file `Faker.rei` to see library usage. | ||
## API | ||
@@ -23,9 +29,9 @@ | ||
```reason | ||
let narrowFood = Faker.Image.food(~width=200, ()); /* => "https://someimage/with/width/of/200" */ | ||
let narrowFood = BsFaker.Image.food(~width=200, ()); /* => "https://someimage/with/width/of/200" */ | ||
/* Without the optional parameters, you don't have to add the unit */ | ||
let defaultFood = Faker.Image.food(); /* => "https://someimage/with/default/width" */ | ||
let defaultFood = BsFaker.Image.food(); /* => "https://someimage/with/default/width" */ | ||
``` | ||
### `Faker.fake` | ||
### `BsFaker.fake` | ||
Creates a string with fake data using mustache style templates. | ||
@@ -35,3 +41,3 @@ Returns a safe, `result` type instead of throwing an error on runtime. | ||
```reason | ||
let message = Faker.fake("Welcome aboard, {{name.firstName}}"); | ||
let message = BsFaker.Faker.fake("Welcome aboard, {{name.firstName}}"); | ||
switch (message) { | ||
@@ -43,116 +49,160 @@ | Ok(msg) => print_endline(msg) | ||
### `Faker.Image` | ||
### `BsFaker.Image` | ||
```reason | ||
let avatar = Faker.Image.avatar(); /* => string; "https://" */ | ||
let abstract = Faker.Image.abstract(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let animals = Faker.Image.animals(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let business = Faker.Image.business(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let cats = Faker.Image.cats(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let city = Faker.Image.city(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let dataUri = Faker.Image.dataUri(~width: int=?, ~height: int=?, ()); /* => string; "data:inage/svg+xml;..." */ | ||
let fashion = Faker.Image.fashion(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let food = Faker.Image.food(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let image = Faker.Image.image(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let imageUrl = Faker.Image.imageUrl(~width: int=?, ~height: int=?, ~category: string=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/640/480" */ | ||
let nature = Faker.Image.nature(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let nightlife = Faker.Image.nightlife(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let people = Faker.Image.people(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let sports = Faker.Image.sports(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let technics = Faker.Image.technics(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let transport = Faker.Image.transport(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let avatar = BsFaker.Image.avatar(); /* => string; "https://" */ | ||
let abstract = BsFaker.Image.abstract(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let animals = BsFaker.Image.animals(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let business = BsFaker.Image.business(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let cats = BsFaker.Image.cats(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let city = BsFaker.Image.city(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let dataUri = BsFaker.Image.dataUri(~width: int=?, ~height: int=?, ()); /* => string; "data:inage/svg+xml;..." */ | ||
let fashion = BsFaker.Image.fashion(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let food = BsFaker.Image.food(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let image = BsFaker.Image.image(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let imageUrl = BsFaker.Image.imageUrl(~width: int=?, ~height: int=?, ~category: string=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/640/480" */ | ||
let nature = BsFaker.Image.nature(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let nightlife = BsFaker.Image.nightlife(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let people = BsFaker.Image.people(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let sports = BsFaker.Image.sports(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let technics = BsFaker.Image.technics(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
let transport = BsFaker.Image.transport(~width: int=?, ~height: int=?, ~randomize: bool=?, ()); /* => string; "http://lorempixel.com/..." */ | ||
``` | ||
### `Faker.Name` | ||
### `BsFaker.Name` | ||
```reason | ||
let findName = Faker.Name.findName(~firstName: string=?, ~lastName: string=?, ~gender: string=?, ()); /* => string; "Mollie Hills" */ | ||
let firstName = Faker.Name.firstName(~gender: string=?, ()); /* => string; "Max" */ | ||
let lastName = Faker.Name.lastName(~gender: string=?, ()); /* => string; "Bartoletti" */ | ||
let prefix = Faker.Name.prefix(~gender: string=?, ()); /* => string; "Dr." */ | ||
let suffix = Faker.Name.suffix(); /* => string; "MD" */ | ||
let title = Faker.Name.title(); /* => string; "Senior Creative Specialist" */ | ||
let jobArea = Faker.Name.jobArea(); /* => string; "Tactics" */ | ||
let jobType = Faker.Name.jobType(); /* => string; "Assistant" */ | ||
let findName = BsFaker.Name.findName(~firstName: string=?, ~lastName: string=?, ~gender: string=?, ()); /* => string; "Mollie Hills" */ | ||
let firstName = BsFaker.Name.firstName(~gender: string=?, ()); /* => string; "Max" */ | ||
let lastName = BsFaker.Name.lastName(~gender: string=?, ()); /* => string; "Bartoletti" */ | ||
let prefix = BsFaker.Name.prefix(~gender: string=?, ()); /* => string; "Dr." */ | ||
let suffix = BsFaker.Name.suffix(); /* => string; "MD" */ | ||
let title = BsFaker.Name.title(); /* => string; "Senior Creative Specialist" */ | ||
let jobArea = BsFaker.Name.jobArea(); /* => string; "Tactics" */ | ||
let jobType = BsFaker.Name.jobType(); /* => string; "Assistant" */ | ||
``` | ||
### `Faker.Internet` | ||
### `BsFaker.Lorem` | ||
```reason | ||
let word = BsFaker.Lorem.word(); /* => string; "Lorem" */ | ||
let words = BsFaker.Lorem.words(~wordCount=3, ()); /* => string; "Lorem ipsum dolor" */ | ||
let sentence = BsFaker.Lorem.sentence(~wordCount=5, ()); /* => string; "Lorem ipsum dolor est totam" */ | ||
let slug = BsFaker.Lorem.slug(~wordCount=3, ()); /* => string; "lorem-ratione-est" */ | ||
let sentences = BsFaker.Lorem.sentences(~sentenceCount=3, ~separator=";;;", ()); /* => string; "Lorem ipsum....;;;Et ratione est..." */ | ||
let paragraph = BsFaker.Lorem.paragraph(~sentenceCount=2, ()); /* => string; "Et ratione est totam assumenda ..." */ | ||
let paragraphs = BsFaker.Lorem.paragraphs(~paragraphCount=3, ~separator="\n----\n", ()); /* => string */ | ||
let text = BsFaker.Lorem.text(); /* => string; "Et lorem est dolor totam... */ | ||
let lines = BsFaker.Lorem.lines(~lineCount=3, ()); /* => string; */ | ||
``` | ||
### `BsFaker.Date` | ||
```reason | ||
let userName = Faker.Internet.userName(~firstName: string=?, ~lastName: string=?, ()); /* => string; "Rage.Max123" */ | ||
let past = BsFaker.Date.past(~years: int=?, ~refDate: Js.Date.t=?, ()); /* => Js.Date.t; */ | ||
``` | ||
### `Faker.Lorem` | ||
### `BsFaker.Company` | ||
```reason | ||
let word = Faker.Lorem.word(); /* => string; "Lorem" */ | ||
let words = Faker.Lorem.words(~wordCount=3, ()); /* => string; "Lorem ipsum dolor" */ | ||
let sentence = Faker.Lorem.sentence(~wordCount=5, ()); /* => string; "Lorem ipsum dolor est totam" */ | ||
let slug = Faker.Lorem.slug(~wordCount=3, ()); /* => string; "lorem-ratione-est" */ | ||
let sentences = Faker.Lorem.sentences(~sentenceCount=3, ~separator=";;;", ()); /* => string; "Lorem ipsum....;;;Et ratione est..." */ | ||
let paragraph = Faker.Lorem.paragraph(~sentenceCount=2, ()); /* => string; "Et ratione est totam assumenda ..." */ | ||
let paragraphs = Faker.Lorem.paragraphs(~paragraphCount=3, ~separator="\n----\n", ()); /* => string */ | ||
let text = Faker.Lorem.text(); /* => string; "Et lorem est dolor totam... */ | ||
let lines = Faker.Lorem.lines(~lineCount=3, ()); /* => string; */ | ||
let suffixes = BsFaker.Company.suffixes(); /* => ["and Sons", "Co.", "Inc."] */ | ||
let companyName = BsFaker.Company.companyName(~format=2, ()); /* => "Dewey, Cheatem and Howe" */ | ||
let companySuffix = BsFaker.Company.companySuffix(); /* => "Co." */ | ||
let catchPhrase = BsFaker.Company.catchPhrase(); /* => string */ | ||
let bs = BsFaker.Company.bs(); /* => string */ | ||
let catchPhraseAdjective = BsFaker.Company.catchPhraseAdjective(); /* => string */ | ||
let catchPhraseDescriptor = BsFaker.Company.catchPhraseDescriptor(); /* => string */ | ||
let catchPhraseNoun = BsFaker.Company.catchPhraseNoun(); /* => string */ | ||
let bsAdjective = BsFaker.Company.bsAdjective(); /* => string */ | ||
let bsBuzz = BsFaker.Company.bsBuzz(); /* => string */ | ||
let bsNoun = BsFaker.Company.bsNoun(); /* => string */ | ||
``` | ||
### `Faker.Date` | ||
### `BsFaker.Phone` | ||
```reason | ||
let past = Faker.Date.past(~years: int=?, ~refDate: Js.Date.t=?, ()); /* => Js.Date.t; */ | ||
let phoneNumber = BsFaker.Phone.phoneNumber(~format="###.###.####", ()); /* => string; "621.876.3963" */ | ||
let phoneNumberFormat = BsFaker.Phone.phoneNumberFormat(~phoneFormatsIndex=0); /* => string; "107-646-3702" */ | ||
let phoneFormats = BsFaker.Phone.phoneFormats(); /* => string; "###-###-#### x###" */ | ||
``` | ||
### `Faker.Company` | ||
### `BsFaker.Internet` | ||
```reason | ||
let suffixes = Faker.Company.suffixes(); /* => ["and Sons", "Co.", "Inc."] */ | ||
let companyName = Faker.Company.companyName(~format=2, ()); /* => "Dewey, Cheatem and Howe" */ | ||
let companySuffix = Faker.Company.companySuffix(); /* => "Co." */ | ||
let catchPhrase = Faker.Company.catchPhrase(); /* => string */ | ||
let bs = Faker.Company.bs(); /* => string */ | ||
let catchPhraseAdjective = Faker.Company.catchPhraseAdjective(); /* => string */ | ||
let catchPhraseDescriptor = Faker.Company.catchPhraseDescriptor(); /* => string */ | ||
let catchPhraseNoun = Faker.Company.catchPhraseNoun(); /* => string */ | ||
let bsAdjective = Faker.Company.bsAdjective(); /* => string */ | ||
let bsBuzz = Faker.Company.bsBuzz(); /* => string */ | ||
let bsNoun = Faker.Company.bsNoun(); /* => string */ | ||
let userName = BsFaker.Internet.userName(~firstName: string=?, ~lastName: string=?, ()); /* => string; "Rage.Max123" */ | ||
let avatar = BsFaker.Internet.avatar(); /* => string; "https://s3.amazonaws.com/uifaces/faces/twitter/igorgarybaldi/128.jpg" */ | ||
let email = BsFaker.Internet.email(); /* => string; ": "foo.bar@gmail.com" */ | ||
let exampleEmail = BsFaker.Internet.exampleEmail(); /* => string; "foo.bar@example.org" */ | ||
let protocol = BsFaker.Internet.protocol(); /* => string; "https" */ | ||
let url = BsFaker.Internet.url(); /* => string; "https://rashawn.name" */ | ||
let domainName = BsFaker.Internet.domainName(); /* => string; "marvin.org" */ | ||
let domainSuffix = BsFaker.Internet.domainSuffix(); /* => string; "net" */ | ||
let domainWord = BsFaker.Internet.domainWord(); /* => string; "alyce" */ | ||
let ip = BsFaker.Internet.ip(); /* => string; "97.238.241.11" */ | ||
let ipv6 = BsFaker.Internet.ipv6(); /* => string; "2001:0db8:6276:b1a7:5213:22f1:25df:c8a0" */ | ||
let userAgent = BsFaker.Internet.userAgent(); /* => string; "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_5 rv:6.0; SL) AppleWebKit/532.0.1 (KHTML, like Gecko)" */ | ||
let color = BsFaker.Internet.color(); /* => string; "#06267f" */ | ||
let mac = BsFaker.Internet.mac(); /* => string; "78:06:cc:ae:b3:81" */ | ||
let password = BsFaker.Internet.password(); /* => string; "AM7zl6Mg" */ | ||
``` | ||
### `Faker.Phone` | ||
### `BsFaker.Random` | ||
```reason | ||
let phoneNumber = Faker.Phone.phoneNumber(~format="###.###.####", ()); /* => string; "621.876.3963" */ | ||
let phoneNumberFormat = Faker.Phone.phoneNumberFormat(~phoneFormatsIndex=0); /* => string; "107-646-3702" */ | ||
let phoneFormats = Faker.Phone.phoneFormats(); /* => string; "###-###-#### x###" */ | ||
let alphaNumeric = BsFaker.Random.alphaNumeric(~count=5, ()); /* => string; "9fedl" */ | ||
let arrayElement = BsFaker.Random.arrayElement(~array=[| 126, -3, 58, 31 |], ()); /* => int; 58 */ | ||
let boolean = BsFaker.Random.boolean(); /* => boolean; true */ | ||
let image = BsFaker.Random.image(); /* => string; "http://lorempixel.com/640/480/city" */ | ||
let locale = BsFaker.Random.locale(); /* => string; "sk" */ | ||
let number = BsFaker.Random.number(~min=0, ~max=150, ~precision=5, ()); /* => int; 65 */ | ||
let uuid = BsFaker.Random.uuid(); /* => string; "053cf30a-e38a-4327-936a-e5e2991f6b7f" */ | ||
let word = BsFaker.Random.word(); /* => string; "Gibraltar" */ | ||
let words = BsFaker.Random.words(~count=3, ()); /* => string; "Savings Account function Executive" */ | ||
``` | ||
### `Faker.Random` | ||
### `BsFaker.Database` | ||
```reason | ||
let alphaNumeric = Faker.Random.alphaNumeric(~count=5, ()); /* => string; "9fedl" */ | ||
let arrayElement = Faker.Random.arrayElement(~array=[| 126, -3, 58, 31 |], ()); /* => int; 58 */ | ||
let boolean = Faker.Random.boolean(); /* => boolean; true */ | ||
let image = Faker.Random.image(); /* => string; "http://lorempixel.com/640/480/city" */ | ||
let locale = Faker.Random.locale(); /* => string; "sk" */ | ||
let number = Faker.Random.number(~min=0, ~max=150, ~precision=5, ()); /* => int; 65 */ | ||
let uuid = Faker.Random.uuid(); /* => string; "053cf30a-e38a-4327-936a-e5e2991f6b7f" */ | ||
let word = Faker.Random.word(); /* => string; "Gibraltar" */ | ||
let words = Faker.Random.words(~count=3, ()); /* => string; "Savings Account function Executive" */ | ||
let column = BsFaker.Database.column(); /* => string; "id" */ | ||
let type_ = BsFaker.Database.type_(); /* => string; "byte" */ | ||
let collation = BsFaker.Database.collation(); /* => string; "utf8_unicode_ci" */ | ||
let engine = BsFaker.Database.engine(); /* => string; "MyISAM" */ | ||
``` | ||
### `Faker.Database` | ||
### `BsFaker.Hacker` | ||
```reason | ||
let column = Faker.Database.column(); /* => string; "id" */ | ||
let type_ = Faker.Database.type_(); /* => string; "byte" */ | ||
let collation = Faker.Database.collation(); /* => string; "utf8_unicode_ci" */ | ||
let engine = Faker.Database.engine(); /* => string; "MyISAM" */ | ||
let abbreviation = BsFaker.Hacker.abbreviation(); /* => string; "XSS" */ | ||
let adjective = BsFaker.Hacker.adjective(); /* => string; "primary" */ | ||
let noun = BsFaker.Hacker.noun(); /* => string; "capacitor" */ | ||
let verb = BsFaker.Hacker.verb(); /* => string; "synthesize" */ | ||
let ingverb = BsFaker.Hacker.ingverb(); /* => string; "hacking" */ | ||
let phrase = BsFaker.Hacker.phrase(); /* => string; "You can't transmit the program without overriding the bluetooth RSS port!" */ | ||
``` | ||
### `Faker.System` | ||
### `BsFaker.System` | ||
```reason | ||
let fileName = Faker.System.fileName(); /* => string; "optical.xsm" */ | ||
let commonFileName = Faker.System.commonFileName(~ext="txt", ()); /* => string; "redundant.txt" */ | ||
let mimeType = Faker.System.mimeType(); /* => string; "audio/webm" */ | ||
let commonFileType = Faker.System.commonFileType(); /* => string; "text" */ | ||
let commonFileExt = Faker.System.commonFileExt(); /* => string; "png" */ | ||
let fileType = Faker.System.fileType(); /* => string; "audio" */ | ||
let fileExt = Faker.System.fileExt(~mimeType="audio/webm", ()); /* => string; "model" */ | ||
let semver = Faker.System.semver(); /* => string; "0.8.1" */ | ||
let fileName = BsFaker.System.fileName(); /* => string; "optical.xsm" */ | ||
let commonFileName = BsFaker.System.commonFileName(~ext="txt", ()); /* => string; "redundant.txt" */ | ||
let mimeType = BsFaker.System.mimeType(); /* => string; "audio/webm" */ | ||
let commonFileType = BsFaker.System.commonFileType(); /* => string; "text" */ | ||
let commonFileExt = BsFaker.System.commonFileExt(); /* => string; "png" */ | ||
let fileType = BsFaker.System.fileType(); /* => string; "audio" */ | ||
let fileExt = BsFaker.System.fileExt(~mimeType="audio/webm", ()); /* => string; "model" */ | ||
let semver = BsFaker.System.semver(); /* => string; "0.8.1" */ | ||
``` | ||
### `BsFaker.Commerce` | ||
```reason | ||
let color = BsFaker.Commerce.color(); /* => string; "maroon" */ | ||
let department = BsFaker.Commerce.department(); /* => string; "Music" */ | ||
let productName = BsFaker.Commerce.productName(); /* => string; "Licensed Steel Keyboard" */ | ||
let price = BsFaker.Commerce.price(~min=0, ~max=1000, ~decimal=2, ~symbol="$", ()); /* => string; "$580.00" */ | ||
let productAdjective = BsFaker.Commerce.productAdjective(); /* => string; "Handcrafted" */ | ||
let productMaterial = BsFaker.Commerce.productMaterial(); /* => string; "Granite" */ | ||
let product = BsFaker.Commerce.product(); /* => string; "Salad" */ | ||
``` | ||
### `BsFaker.Locale` | ||
`setLocale` function accepts parameter in form of variant. | ||
The variant's constructors are capitalized locale ids of available locales, i.e. `Az` | `Cz` | `De` | `En_GB` etc. | ||
```reason | ||
let () = BsFaker.Locale.setLocale(Sk); /* => unit */ | ||
let locale = BsFaker.Locale.getLocale(); /* => string; "sk" */ | ||
``` | ||
# Testing the library | ||
@@ -159,0 +209,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
161144
50
67
0
217