Interface Product

Generator to generate product related entries.

interface Product {
    product(): Record<string, unknown>;
    productCategory(): string;
    productDescription(): string;
    productFeature(): string;
    productMaterial(): string;
    productName(): string;
    productUpc(): string;
}

Methods

  • An item created for sale or use.

    Returns Record<string, unknown>

    a random product

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.product.product())
    }

    Output (formatted as JSON value)

    {"Name":"Quartz Teal Scale","Description":"Bravo mirror hundreds his party nobody. Anything wit she from above Chinese those choir toilet as you of other enormously.","Categories":["mobile phones","food and groceries","furniture"],"Price":82.9,"Features":["durable"],"Color":"green","Material":"bronze","UPC":"084020104876"}
    
  • Classification grouping similar products based on shared characteristics or functions.

    Returns string

    a random product category

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.product.productCategory())
    }

    Output (formatted as JSON value)

    "mobile phones"
    
  • Explanation detailing the features and characteristics of a product.

    Returns string

    a random product description

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.product.productDescription())
    }

    Output (formatted as JSON value)

    "Up brace lung anyway then bravo mirror hundreds his party. Person anything wit she from above Chinese those choir toilet as you."
    
  • Specific characteristic of a product that distinguishes it from others products.

    Returns string

    a random product feature

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.product.productFeature())
    }

    Output (formatted as JSON value)

    "touchscreen"
    
  • The substance from which a product is made, influencing its appearance, durability, and properties.

    Returns string

    a random product material

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.product.productMaterial())
    }

    Output (formatted as JSON value)

    "alloy"
    
  • Distinctive title or label assigned to a product for identification and marketing.

    Returns string

    a random product name

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.product.productName())
    }

    Output (formatted as JSON value)

    "Stream Gold Robot"
    
  • Standardized barcode used for product identification and tracking in retail and commerce.

    Returns string

    a random product upc

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.product.productUpc())
    }

    Output (formatted as JSON value)

    "092964558555"