New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-elizabeth

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-elizabeth

![logo](logo.png)

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

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.

FlagCodeNameNative name
1🇨🇿csCzechČesky
2🇩🇰daDanishDansk
3🇩🇪deGermanDeutsch
4🇦🇹de-atAustrian GermanDeutsch
5🇨🇭de-chSwiss GermanDeutsch
6🇺🇸enEnglishEnglish
7🇦🇺en-auAustralian EnglishEnglish
8🇨🇦en-caCanadian EnglishEnglish
9🇬🇧en-gbBritish EnglishEnglish
10🇪🇸esSpanishEspañol
11🇲🇽es-mxMexican SpanishEspañol
12🇮🇷faFarsiفارسی
13🇫🇮fiFinnishSuomi
14🇫🇷frFrenchFrançais
15🇭🇺huHungarianMagyar
16🇮🇸isIcelandicÍslenska
17🇮🇹itItalianItaliano
18🇯🇵jaJapanese日本語
19🇰🇷koKorean한국어
20🇳🇱nlDutchNederlands
21🇧🇪nl-beBelgium DutchNederlands
22🇳🇴noNorwegianNorsk
23🇵🇱plPolishPolski
24🇵🇹ptPortuguesePortuguês
25🇧🇷pt-brBrazilian PortuguesePortuguês Brasileiro
26🇷🇺ruRussianРусский
27🇸🇪svSwedishSvenska
28🇹🇷trTurkishTürkçe
29🇺🇦ukUkrainianУкраїнський
30🇨🇳zhChinese汉语

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

Keywords

fake

FAQs

Package last updated on 07 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts