Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@faykah/first-names-en

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@faykah/first-names-en

An English first names dataset.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@faykah/first-names-en

An English first names dataset.

Summary

  • About
  • Features
  • Installation
  • Examples

About

Faykah is a Node.js library that help create generators for various data.

This library contains a data set of English first names suited for mocking and testing emails.

Features

  • Provides a variable containing 63 first names of men and women
  • Provides a browser version
  • Provides its own Typescript definition

Installation

Using NPM:

npm install --save-dev @faykah/first-names-en

Using Yarn:

yarn add --dev @faykah/first-names-en

Examples

1. Create an array generator

In this example, we will create a first name generator.

ES6

import { createArrayGenerator } from "@faykah/core";
import { firstNames } from "@faykah/first-names-en";

const generateFirstName = createArrayGenerator(firstNames);

generateFirstName(); // "Oscar"
generateFirstName(); // "Isabella"
generateFirstName(); // "Samantha"

CJS

const { createArrayGenerator } = require("@faykah/core");
const { firstNames } = require("@faykah/first-names-en");

const generateFirstName = createArrayGenerator(firstNames);

generateFirstName(); // "Oscar"
generateFirstName(); // "Isabella"
generateFirstName(); // "Samantha"

Browser

<body>
	<script type="text/javascript" src="https://unpkg.com/@faykah/core@0.1.0/lib/index.browser.min.js" defer></script>
	<script type="text/javascript" src="https://unpkg.com/@faykah/first-names-en@0.1.0/lib/index.browser.min.js" defer></script>

	<script type="text/javascript" defer>
		const generateFirstName = Faykah.createArrayGenerator(Faykah.firstNames);

		generateFirstName(); // "Oscar"
		generateFirstName(); // "Isabella"
		generateFirstName(); // "Samantha"
	</script>
</body>

2. Standalone usage

In this example, we will loop through the first names to see what is inside.

ES6

import { firstNames } from "@faykah/first-names-en";

for (const firstName of firstNames) {
	console.log(firstName);
}

CJS

const { firstNames } = require("@faykah/first-names-en");

for (const firstName of firstNames) {
	console.log(firstName);
}

Browser

<body>
	<script type="text/javascript" src="https://unpkg.com/@faykah/first-names-en@0.1.0/lib/index.browser.min.js" defer></script>

	<script type="text/javascript" defer>
		for (const firstName of Faykah.firstNames) {
			console.log(firstName);
		}
	</script>
</body>

Keywords

FAQs

Package last updated on 28 Nov 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc