From 71e902599651b645cdb6996c8cd562e8007a32ea Mon Sep 17 00:00:00 2001 From: Jess Date: Wed, 12 Jan 2022 19:48:48 -0500 Subject: feat: adding documentation with vitepress (#80) --- docs/api/commerce.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/api/commerce.md (limited to 'docs/api/commerce.md') diff --git a/docs/api/commerce.md b/docs/api/commerce.md new file mode 100644 index 00000000..a7809709 --- /dev/null +++ b/docs/api/commerce.md @@ -0,0 +1,62 @@ +# Commerce + +[[toc]] + +## Color + +Return random color name + +```js +faker.commerce.color(); // fuchsia +``` + +## Department + +Return random department name + +```js +faker.commerce.department(); // Grocery +``` + +## Price + +Generates random price + +::: tip +| Param | Type | Default | +| ------ | ------ | :-----: | +| min | number | `1` | +| max | number | `1000` | +| dec | number | `2` | +| symbol | string | `` | +::: + +```js +faker.commerce.price(); // 4.00 +faker.commerce.price(2, 22, 1, '$'); // $7.0 +``` + +## Product + +Return random product + +```js +faker.commerce.product(); // Gloves +faker.commerce.productName(); // Rustic Granite Shirt +``` + +## Product Adjective + +Return random product adjective + +```js +faker.commerce.productAdjective(); // Handmade +``` + +## Product Material + +Return random product material + +```js +faker.commerce.productMaterial(); // Steel +``` -- cgit v1.2.3