Skip to content

Book

Module to generate book related entries.

Overview

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'

format

Returns a random book format.

Available since v9.1.0

Returns: string

ts
function format(): string;

Examples

ts
faker.book.format() // 'Hardcover'

genre

Returns a random genre.

Available since v9.1.0

Returns: string

ts
function genre(): string;

Examples

ts
faker.book.genre() // 'Fantasy'

publisher

Returns a random publisher.

Available since v9.1.0

Returns: string

ts
function publisher(): string;

Examples

ts
faker.book.publisher() // 'Addison-Wesley'

series

Returns a random series.

Available since v9.1.0

Returns: string

ts
function series(): string;

Examples

ts
faker.book.series() // 'Harry Potter'

title

Returns a random title.

Available since v9.1.0

Returns: string

ts
function title(): string;

Examples

ts
faker.book.title() // 'Romeo and Juliet'

Released under the MIT License.