blob: a7809709f46074931557d94be684bfb694f36795 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
```
|