Age package provides functionality to generate a fake age value.
npm
npm install @fakerjs/age --save-dev
yarn
yarn add @fakerjs/age -D
import age from '@fakerjs/age';
age();
//=> 42
age({type: 'child'});
//=> 10
// Allowed type: child, teen, adult, senior
Run tests
npm run test
The MIT License (MIT) Copyright (c) Sergey Romanenko