Generate business and e-commerce related data including products, prices, company information, and business terminology. This module provides comprehensive tools for creating realistic commercial data for testing and development.
Generate realistic product names, descriptions, and related attributes for e-commerce applications.
/**
* Generate a random descriptive product name
* @returns Complete product name with adjective, material, and product
*/
productName(): string;
/**
* Generate a product adjective descriptor
* @returns Product adjective (e.g., 'Handcrafted', 'Premium')
*/
productAdjective(): string;
/**
* Generate a product material type
* @returns Product material (e.g., 'Rubber', 'Steel', 'Cotton')
*/
productMaterial(): string;
/**
* Generate a short product name
* @returns Basic product name (e.g., 'Computer', 'Chair')
*/
product(): string;
/**
* Generate a detailed product description
* @returns Marketing-style product description
*/
productDescription(): string;Usage Examples:
import { faker } from "@faker-js/faker";
// Generate complete product information
const fullProduct = faker.commerce.productName();
// Example: 'Incredible Soft Gloves'
const adjective = faker.commerce.productAdjective();
// Example: 'Handcrafted'
const material = faker.commerce.productMaterial();
// Example: 'Rubber'
const basicProduct = faker.commerce.product();
// Example: 'Computer'
const description = faker.commerce.productDescription();
// Example: 'Featuring Phosphorus-enhanced technology, our Fish offers unparalleled Modern performance'
// Create complete product listing
const productListing = {
name: faker.commerce.productName(),
description: faker.commerce.productDescription(),
price: faker.commerce.price({ min: 10, max: 500, symbol: '$' }),
category: faker.commerce.department()
};Generate realistic pricing data with flexible formatting and currency support.
/**
* Generate a price with customizable range and formatting
* @param options - Price generation options
* @returns Formatted price string
*/
price(options?: {
/** The minimum price */
min?: number;
/** The maximum price */
max?: number;
/** The number of decimal places */
dec?: number;
/** The currency symbol to use */
symbol?: string;
}): string;Usage Examples:
import { faker } from "@faker-js/faker";
// Generate basic price
const basicPrice = faker.commerce.price();
// Example: '828.07'
// Generate price with range
const rangedPrice = faker.commerce.price({ min: 100, max: 500 });
// Example: '354.19'
// Generate price with currency symbol
const currencyPrice = faker.commerce.price({
min: 50,
max: 200,
symbol: '$'
});
// Example: '$154.55'
// Generate whole number price
const wholePrice = faker.commerce.price({
min: 10,
max: 100,
dec: 0
});
// Example: '73'
// Generate precise pricing
const precisePrice = faker.commerce.price({
min: 1,
max: 10,
dec: 3,
symbol: '€'
});
// Example: '€7.259'Generate department names for retail stores and product categorization.
/**
* Generate a department name inside a shop
* @returns Department name
*/
department(): string;Usage Examples:
import { faker } from "@faker-js/faker";
// Generate department names
const department = faker.commerce.department();
// Example: 'Garden'
const departments = Array.from({ length: 5 }, () => faker.commerce.department());
// Example: ['Electronics', 'Clothing', 'Books', 'Sports', 'Home']
// Create department-based product organization
const departmentProducts = {
department: faker.commerce.department(),
products: Array.from({ length: 3 }, () => ({
name: faker.commerce.productName(),
price: faker.commerce.price({ symbol: '$' })
}))
};Generate valid ISBN (International Standard Book Number) identifiers for books and publications.
/**
* Generate a random ISBN identifier
* @param options - ISBN format options or variant number
* @returns Formatted ISBN string
*/
isbn(options?: 10 | 13 | {
/** The variant to return (10 or 13 digit format) */
variant?: 10 | 13;
/** The separator to use in the format */
separator?: string;
}): string;Usage Examples:
import { faker } from "@faker-js/faker";
// Generate 13-digit ISBN (default)
const isbn13 = faker.commerce.isbn();
// Example: '978-0-692-82459-7'
// Generate 10-digit ISBN
const isbn10 = faker.commerce.isbn(10);
// Example: '1-155-36404-X'
// Generate ISBN with custom separator
const spaceISBN = faker.commerce.isbn({ separator: ' ' });
// Example: '978 0 452 81498 1'
// Generate specific variant with custom separator
const customISBN = faker.commerce.isbn({
variant: 10,
separator: ' '
});
// Example: '0 940319 49 7'Generate company-related data including names, catchphrases, and business terminology.
/**
* Generate a random company name
* @returns Company name with realistic formatting
*/
name(): string;
/**
* Generate a marketing catchphrase for display to end users
* @returns Professional catchphrase
*/
catchPhrase(): string;
/**
* Generate a business buzz phrase for managerial contexts
* @returns Business jargon phrase
*/
buzzPhrase(): string;
/**
* Generate a company suffix (Inc., LLC, etc.)
* @returns Company suffix
*/
companySuffix(): string;Usage Examples:
import { faker } from "@faker-js/faker";
// Generate company information
const companyName = faker.company.name();
// Example: 'Zieme, Hauck and McClure'
const catchPhrase = faker.company.catchPhrase();
// Example: 'Upgradable systematic flexibility'
const buzzPhrase = faker.company.buzzPhrase();
// Example: 'cultivate synergistic e-markets'
const suffix = faker.company.companySuffix();
// Example: 'Inc'
// Create complete company profile
const companyProfile = {
name: faker.company.name(),
slogan: faker.company.catchPhrase(),
industry: faker.commerce.department(),
description: faker.company.buzzPhrase()
};Generate individual components of business catchphrases for custom phrase construction.
/**
* Generate a catchphrase adjective
* @returns Adjective for catchphrases
*/
catchPhraseAdjective(): string;
/**
* Generate a catchphrase descriptor
* @returns Descriptor for catchphrases
*/
catchPhraseDescriptor(): string;
/**
* Generate a catchphrase noun
* @returns Noun for catchphrases
*/
catchPhraseNoun(): string;
/**
* Generate a buzz verb for business jargon
* @returns Business action verb
*/
buzzVerb(): string;
/**
* Generate a buzz adjective for business jargon
* @returns Business descriptor adjective
*/
buzzAdjective(): string;
/**
* Generate a buzz noun for business jargon
* @returns Business concept noun
*/
buzzNoun(): string;Usage Examples:
import { faker } from "@faker-js/faker";
// Generate catchphrase components
const adjective = faker.company.catchPhraseAdjective();
// Example: 'Multi-tiered'
const descriptor = faker.company.catchPhraseDescriptor();
// Example: 'composite'
const noun = faker.company.catchPhraseNoun();
// Example: 'leverage'
// Create custom catchphrase
const customCatchphrase = `${faker.company.catchPhraseAdjective()} ${faker.company.catchPhraseDescriptor()} ${faker.company.catchPhraseNoun()}`;
// Example: 'Multi-layered didactic paradigm'
// Generate buzz phrase components
const buzzVerb = faker.company.buzzVerb();
// Example: 'implement'
const buzzAdj = faker.company.buzzAdjective();
// Example: 'dynamic'
const buzzNoun = faker.company.buzzNoun();
// Example: 'solutions'
// Create custom buzz phrase
const customBuzz = `${buzzVerb} ${buzzAdj} ${buzzNoun}`;
// Example: 'implement dynamic solutions'import { faker } from "@faker-js/faker";
// Generate a complete online store catalog
const storeCatalog = Array.from({ length: 20 }, () => ({
id: faker.string.uuid(),
name: faker.commerce.productName(),
description: faker.commerce.productDescription(),
price: faker.commerce.price({ min: 5, max: 999, symbol: '$' }),
department: faker.commerce.department(),
isbn: faker.datatype.boolean({ probability: 0.3 })
? faker.commerce.isbn()
: undefined, // Only some products have ISBNs
inStock: faker.datatype.boolean({ probability: 0.85 }),
rating: faker.number.float({ min: 1, max: 5, fractionDigits: 1 })
}));import { faker } from "@faker-js/faker";
// Generate business directory entries
const businessDirectory = Array.from({ length: 10 }, () => ({
companyName: faker.company.name(),
slogan: faker.company.catchPhrase(),
industry: faker.commerce.department(),
businessModel: faker.company.buzzPhrase(),
address: faker.location.streetAddress({ useFullAddress: true }),
phone: faker.phone.number(),
email: faker.internet.email(),
website: faker.internet.url()
}));The price() method includes realistic pricing patterns:
dec > 0):
950This simulates real-world psychological pricing strategies.
Commerce and company data respects the current faker locale:
The commerce modules handle edge cases gracefully:
'0' formatted price