Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

faker npm

 //Install using npm
    npm install @faker-js/faker --save-dev

  // Import in your Project
  import {faker} from '@faker-js/faker';

  // Get your Result
  const getProduct=()=>{
    setProducts([...Array(20)].map(()=>{
      return{
        id: faker.datatype.uuid(),
        name:faker.commerce.productName(),
        price: Math.round(faker.finance.amount()),
        image: faker.image.image()
      }
    }))
  }
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery on enter click 
Javascript :: brackets not autocompleting in js file in vscode 
Javascript :: how to replace commas with nothing in javascript 
Javascript :: remove blank space javascript 
Javascript :: moving a item fro index to another index, javascript 
Javascript :: sort an array by characters length in js 
Javascript :: file system replace line js 
Javascript :: firebase get current user javascript 
Javascript :: react native flatlist pull to refresh 
Javascript :: jquery right click 
Javascript :: lip. dips *dipped. also mm bpi. -opp. -ditty 
Javascript :: cypress scroll bottom 
Javascript :: remove prefix js 
Javascript :: current date in javascript 
Javascript :: node js sublime text 
Javascript :: round a number to fixed decimals 
Javascript :: react native button 
Javascript :: javascript length of number 
Javascript :: vue htmlWebpackPlugin.options.title 
Javascript :: Math prime js 
Javascript :: add class tr datatable 
Javascript :: orthographic camera three js 
Javascript :: Get the value of selected radio button 
Javascript :: mysql json change key 
Javascript :: longest substring without repeating characters in javascript 
Javascript :: chart js y axis integer 
Javascript :: classlist add js to add more than one class 
Javascript :: discord.js send text in different channel on server 
Javascript :: Selector All Element querySelector Method 
Javascript :: javascript check collision 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =