unique-callback
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

unique-callback npm version

Drop-in replacement for faker.helpers.unique. Generates a unique result using the results of the given method. Used unique entries will be stored internally and filtered from subsequent calls.

Example

import { faker } from "@faker-js/faker";
import unique from "unique-callback";

const entity = {
    firstName: 'Billy',
    lastName: 'Bob',
    email: unique(faker.internet.email)
}

Inspiration

faker.helpers.unique got deprecated 😔

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i unique-callback

    Weekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    8.22 kB

    Total Files

    8

    Last publish

    Collaborators

    • ianchanning