npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-elizabeth

v0.1.1

Published

![logo](logo.png)

Downloads

19

Readme

logo

npm version Build Status Coverage Status Codacy Badge

Description

node-elizabeth is a port of Python library elizabeth for generating dummy data for a variety of purposes. This data can be particularly useful during software development and testing. For example, it could be used to populate a testing database for a web application with user information such as email addresses, usernames, first names, last names, etc.

Installation

yarn add node-elizabeth -D

Documentation

Github pages

Basic Usage

import { Personal } from 'node-elizabeth';
// default locale is 'en'
const person = new Personal();
person.fullName({ gender: 'male' });
// Inell Britt

Locales

You can specify a locale when creating providers and they will return data that is appropriate for the language or country associated with that locale. elizabeth currently includes support for 30 different locales.

| № | Flag | Code | Name | Native name | |--- |--- |--- |--- |--- | | 1 | 🇨🇿 | cs | Czech | Česky | | 2 | 🇩🇰 | da | Danish | Dansk | | 3 | 🇩🇪 | de | German | Deutsch | | 4 | 🇦🇹 | de-at | Austrian German | Deutsch | | 5 | 🇨🇭 | de-ch | Swiss German | Deutsch | | 6 | 🇺🇸 | en | English | English | | 7 | 🇦🇺 | en-au | Australian English | English | | 8 | 🇨🇦 | en-ca | Canadian English | English | | 9 | 🇬🇧 | en-gb | British English | English | | 10 | 🇪🇸 | es | Spanish | Español | | 11 | 🇲🇽 | es-mx | Mexican Spanish | Español | | 12 | 🇮🇷 | fa | Farsi | فارسی | | 13 | 🇫🇮 | fi | Finnish | Suomi | | 14 | 🇫🇷 | fr | French | Français | | 15 | 🇭🇺 | hu | Hungarian | Magyar | | 16 | 🇮🇸 | is | Icelandic | Íslenska | | 17 | 🇮🇹 | it | Italian | Italiano | | 18 | 🇯🇵 | ja | Japanese | 日本語 | | 19 | 🇰🇷 | ko | Korean | 한국어 | | 20 | 🇳🇱 | nl | Dutch | Nederlands | | 21 | 🇧🇪 | nl-be | Belgium Dutch | Nederlands | | 22 | 🇳🇴 | no | Norwegian | Norsk | | 23 | 🇵🇱 | pl | Polish | Polski | | 24 | 🇵🇹 | pt | Portuguese | Português | | 25 | 🇧🇷 | pt-br | Brazilian Portuguese | Português Brasileiro | | 26 | 🇷🇺 | ru | Russian | Русский | | 27 | 🇸🇪 | sv | Swedish | Svenska | | 28 | 🇹🇷 | tr | Turkish | Türkçe | | 29 | 🇺🇦 | uk | Ukrainian | Український | | 30 | 🇨🇳 | zh | Chinese | 汉语 |

Using locales:

import { Personal } from 'node-elizabeth';

const en = new Personal();
const de = new Personal({ locale: 'de' });

en.fullName();
// Inell Britt
de.fullName();
//Sabrina Gutermuth

Port limitations

Due to JavaScript limitations there's specific method signatures - all methods take opts object as their single argument. Also first release don't include all the providers, custom providers and decorators from original library.

Running tests

npm run test

Upcoming

  • Generic provider from original library
  • Custom providers