get-generation
TypeScript icon, indicating that this package has built-in type declarations

1.2.8 • Public • Published

get-generation

Travis

This module returns the generation of a person, given it's birth year

For example, if a person was born in 2000, it would say that he/she is from the Generation Z

Installation

npm i --save get-generation

Generations available

  • Traditionalist < 1946
  • Older Boomer < 1955
  • Younger Boomer < 1965
  • Generation X (older) < 1971
  • Generation X (younger) < 1981
  • Generation Y < 1996
  • Generation Z < 2011
  • Generation Alpha (now) // 2018

Usage

import { getGenerationByAge, getGenerationByYear, getAllGenerationsInfo } from "get-generation";

getGenerationByYear(1954) // Older Boomer
getGenerationByYear(2011) // Generation Alpha
getGenerationByAge(20) // Generation Z (as of 2018)

getAllGenerationsInfo();
/* returns
[{
    name: 'Traditionalist',
    range: {
      min: 0,
      max: 1954,
    },
  }, {
    name: 'Older Boomer',
    ....
  }
]
*/

Creator

Juan Camilo Guarín Peñaranda Cali, Colombia

License

MIT.

Bibliography

Readme

Keywords

Package Sidebar

Install

npm i get-generation

Weekly Downloads

3

Version

1.2.8

License

MIT

Unpacked Size

6.71 kB

Total Files

5

Last publish

Collaborators

  • jcguarinpenaranda123