faker.company.bs is deprecated
Opened this issue · 0 comments
mfulton26 commented
[@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`
}),
});