const faker = require('faker'); const randomNumber = faker.random.number({min: 1, max: 100}); console.log(randomNumber); // Output: any random number between 1 to 100
const faker = require('faker'); const randomDecimal = faker.random.number({min: 0, max: 10, precision: 0.01}); console.log(randomDecimal); // Output: any random decimal with 2 decimal places within 0 to 10
const faker = require('faker'); const randomInteger = faker.random.number({min: 0, max: 100, step: 5}); console.log(randomInteger); // Output: any random integer number with step size of 5 within 0 to 100The package library for faker is 'faker'.