Book
Module to generate book related entries.
Overview
- For a random title, use
title()
. - For a random existing author name, use
author()
. - For a random non-existing author name, use
faker.person.fullName()
. - For a random genre, use
genre()
. - For a random series, use
series()
. - For a random publisher, use
publisher()
. - For a random book format, use
format()
. - For a random isbn, use
faker.commerce.isbn()
All values may be localized.
author
Returns a random author name.
Available since v9.1.0
Returns: string
ts
function author(): string;
Examples
ts
faker.book.author() // 'William Shakespeare'
Source
format
Returns a random book format.
Available since v9.1.0
Returns: string
ts
function format(): string;
Examples
ts
faker.book.format() // 'Hardcover'
Source
genre
Returns a random genre.
Available since v9.1.0
Returns: string
ts
function genre(): string;
Examples
ts
faker.book.genre() // 'Fantasy'
Source
publisher
Returns a random publisher.
Available since v9.1.0
Returns: string
ts
function publisher(): string;
Examples
ts
faker.book.publisher() // 'Addison-Wesley'
Source
series
Returns a random series.
Available since v9.1.0
Returns: string
ts
function series(): string;
Examples
ts
faker.book.series() // 'Harry Potter'
Source
title
Returns a random title.
Available since v9.1.0
Returns: string
ts
function title(): string;
Examples
ts
faker.book.title() // 'Romeo and Juliet'