To make use of this function, install our package - date-of-birth-generator inside your function with below command,
npm i date-of-birth-generator
Next step is to import function into your script with below command,
const newDate = require('date-of-birth-generator')
const newDate = require('date-of-birth-generator')
let dob = newDate.randomDate(23)
const newDate = require('date-of-birth-generator')
let dob = newDate.randomDate()