Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faker.company.bs is deprecated #200

Open
mfulton26 opened this issue Apr 7, 2024 · 0 comments
Open

faker.company.bs is deprecated #200

mfulton26 opened this issue Apr 7, 2024 · 0 comments

Comments

@mfulton26
Copy link

[@faker-js/faker]: faker.company.bs is deprecated since v8.0 and will be removed in v9.0. Please use faker.company.buzzPhrase instead.

import { z } from "zod";

// based on https://jsonplaceholder.typicode.com/users
export const User = z.object({
  id: z.number().positive().int(),
  name: z.string(),
  username: z.string().regex(/[a-z._]/i),
  email: z.string().email(),
  address: z.object({
    street: z.string(),
    suite: z.string(),
    city: z.string(),
    zipcode: z.string(),
    geo: z.object({
      lat: z.coerce.number().min(-90).max(90),
      lng: z.coerce.number().min(-180).max(180),
    }),
  }),
  phone: z.string(),
  website: z.string(),
  company: z.object({
    name: z.string(),
    catchPhrase: z.string(),
    bs: z.string(), // the API serves us `bs` which needs to be mapped to `buzzPhrase`
  }),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant