samedi 3 octobre 2020

How to generate random upper Case letters min length 10, max length 10 with faker for vendor code, smth like this AARPSJGHAH

How to generate random upper Case letters min length 10, max length 10 with faker?

const name = faker.commerce.productName();
const description = faker.commerce.productDescription();
const price = faker.commerce.price();
const vendorCode = ???????;

const product = new Product({
_id: new mongoose.Types.ObjectId(),

owner: '5eae50fc12011e161e931cc3',

name,enter code here`
description,
price,
vendorCode



Aucun commentaire:

Enregistrer un commentaire