1.1.1 • Published 8 years ago

name_data.js v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

name_data.js

Name data in JSON for Javascript

Selection and generation of names, for fake name data.

Parsed JSON of male and female first name data, as well as gender neutral last name data, ostensibly taken from the 1990 US census. Contains 1219 male names, 4275 female names, and 18,840 last names, as well as estimated (rough) commonality.

Usage

Pretty straightforward stuff, rly.

> const nd = require('name_data');
undefined

> nd.mens_first_name_data;
{ aaron: 350151,
  abdul: 10213,
...
  zackary: 5836,
  zane: 10213 }

> Object.keys(nd.mens_first_name_data).length;
1219

> nd.random_womens_first_name();
'helen'

> nd.random_mens_first_name();
'john'

> [1,1,1,1,1,1].map(_ => nd.random_first_name() );
[ 'seth', 'lauren', 'jill', 'kathy', 'marshall', 'loretta' ]

> nd.random_last_name();
'lopez'

> nd.random_name();
'dawn knight'

> [1,1,1,1,1,1].map(_ => nd.random_name() );
[ 'maria burns',
  'jennette howell',
  'vanessa carnes',
  'richard robertson',
  'amanda reiley',
  'jason carroll' ]

Polemic :neckbeard:

name_data.js is MIT licensed, because viral licenses and newspeak language modification are evil. Free is only free when it's free for everyone.

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago