aboutsummaryrefslogtreecommitdiff
path: root/docs/api/commerce.md
diff options
context:
space:
mode:
authorJess <[email protected]>2022-01-12 19:48:48 -0500
committerGitHub <[email protected]>2022-01-12 19:48:48 -0500
commit71e902599651b645cdb6996c8cd562e8007a32ea (patch)
tree368e83ffbeb836d5c66ad7af53c765c7444a26cb /docs/api/commerce.md
parenta590f266e02d8f8a2cac65cb6e8bd395bf04074b (diff)
downloadfaker-71e902599651b645cdb6996c8cd562e8007a32ea.tar.xz
faker-71e902599651b645cdb6996c8cd562e8007a32ea.zip
feat: adding documentation with vitepress (#80)
Diffstat (limited to 'docs/api/commerce.md')
-rw-r--r--docs/api/commerce.md62
1 files changed, 62 insertions, 0 deletions
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
+```