JSFiddle - React, Tailwind, and code Playground
by Katarn
JavaScript
import { Faker, es, en } from 'https://esm.sh/@faker-js/faker';
const faker = new Faker({ locale: [es, en]});
const apellidos = faker.person.lastName();
const nombre = faker.person.firstName();
const email = faker.internet.email();
const nacimiento = new Intl.DateTimeFormat('es-ES').format(faker.date.birthdate());
const direccion = faker.location.streetAddress();
const postal = faker.location.zipCode();
const ciudad = faker.location.city();
const telefono = faker.phone.number();
const tarjeta = faker.finance.creditCardNumber();
const cvv = faker.finance.creditCardCVV();
const expiracionA = faker.date.future();
const expiracion = `${(expiracionA.getMonth() + 1).toString().padStart(2, '0')}/${expiracionA.getFullYear().toString().slice(-2)}`;
console.log({ apellidos, nombre, email, nacimiento, direccion, postal, ciudad, telefono, tarjeta, expiracion, cvv });