Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bukinoshita/rnd-age

:keycap_ten: Generate a random age
https://github.com/bukinoshita/rnd-age

age generator javascript nodejs random

Last synced: about 1 month ago
JSON representation

:keycap_ten: Generate a random age

Awesome Lists containing this project

README

        

# rnd-age
> Generate a random age

[![Codeship Status for bukinoshita/rnd-age](https://app.codeship.com/projects/1e444310-df44-0134-4201-2626b392372a/status?branch=master)](https://app.codeship.com/projects/204873)
[![Build Status](https://travis-ci.org/bukinoshita/rnd-age.svg?branch=master)](https://travis-ci.org/bukinoshita/rnd-age)
[![GitHub release](https://img.shields.io/github/release/bukinoshita/rnd-age.svg)](https://www.npmjs.com/package/rnd-age)
[![license](https://img.shields.io/github/license/bukinoshita/rnd-age.svg)](https://raw.githubusercontent.com/bukinoshita/rnd-age/master/LICENSE)

## Install
```bash
$ npm install --save rnd-age
```

## Usage
```js
import rndAge from 'rnd-age'

rndAge(1990, 1994).then(randomAge => console.log(`John has ${randomAge} years`))
// => John has 22 years
```

## API
### rnd-age(from, to)

#### from
Type: `Number`

Required

#### to
Type: `Number`

Required

## Related
- [rnd-date](https://github.com/bukinoshita/rnd-date) — :date: Get a random date

## License
[MIT](https://github.com/bukinoshita/rnd-age/blob/master/LICENSE) © Bu Kinoshita