Giter Site home page Giter Site logo

arabic-personal-names's Introduction

arabic-personal-names

A list of Arabic personal names. Useful for generating realistic user profile in tests.

Installation

npm install --save arabic-personal-names

Usage

The module is extremely easy to use:

var names = require('arabic-personal-names')

console.log(names.male) // array with male first names, sorted alphabetically

console.log(names.female) // array with female first names, alphabetically

console.log(names.last) // array with last names, alphabetically

You can also require each array as JSON:

var male = require('arabic-personal-names/male.json')

var female = require('arabic-personal-names/female.json')

var last = require('arabic-personal-names/last.json')

Usage with Chance.js

The most common use for this module might be to generate random Arabic names for use in project tests. One possible way to do that is to combine this module with a psuedo-random data generator, like the excellent Chance library:

var Chance = require('chance'),
    names = require('arabic-personal-names')

var chance = new Chance() // You can also pass a constant seed for reproducible tests

var male = {
  // pick a random male first name
  firstName: chance.pick(names.male),
  // pick a random last name
  lastName: chance.pick(names.last)
}

var female = {
  firstName: chance.pick(names.female),
  lastName: chance.pick(names.last)
};

console.log(male.firstName + ' ' + male.lastName)
// مازن قطان

console.log(female.firstName + ' ' + female.lastName)
// بنان حسين

arabic-personal-names's People

Contributors

forabi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.