Returns a random ISBN identifier.
Optional
options: 10 | 13 | { separator?: string; variant?: 10 | 13 }The variant to return or an options object.
Optional
separator?: stringThe separator to use in the format.
Optional
variant?: 10 | 13The variant of the identifier to return.
Can be either 10
(10-digit format)
or 13
(13-digit format).
faker.commerce.isbn() // '978-0-692-82459-7'
faker.commerce.isbn(10) // '1-155-36404-X'
faker.commerce.isbn(13) // '978-1-60808-867-6'
faker.commerce.isbn({ separator: ' ' }) // '978 0 452 81498 1'
faker.commerce.isbn({ variant: 10, separator: ' ' }) // '0 940319 49 7'
faker.commerce.isbn({ variant: 13, separator: ' ' }) // '978 1 6618 9122 0'
Generates a price between min and max (inclusive).
To better represent real-world prices, when options.dec
is greater than 0
, the final decimal digit in the returned string will be generated as follows:
9
5
0
0
to 9
Optional
options: { dec?: number; max?: number; min?: number; symbol?: string }An options object.
Optional
dec?: numberThe number of decimal places.
Optional
max?: numberThe maximum price.
Optional
min?: numberThe minimum price.
Optional
symbol?: stringThe currency value to use.
Module to generate commerce and product related entries.
Overview
For a long product name like
'Incredible Soft Gloves'
, useproductName()
. The product names are generated from a list of adjectives, materials, and products, which can each be accessed separately usingproductAdjective()
,productMaterial()
, andproduct()
. You can also create a description usingproductDescription()
.For a department in a shop or product category, use
department()
.You can also create a price using
price()
.