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

ng-faker

v1.3.1

Published

generate massive amounts of fake nigerian data

Downloads

266

Readme

NG-Faker

Build Status Coverage Status star this repo fork this repo npm Open Source Love Open Source Love

Usage

Installation

Install with npm:

npm install ng-faker --save-dev

Install with yarn:

yarn add ng-faker --dev

Browser

For now, we don't have support for the browser directly. We're working on that and should have that up really soon.

Node.js

    var ngfaker = require('ng-faker');

    var randomName = ngfaker.name.firstName(); // Annabelle
    var randomWord = ngfaker.lorem.phrase(); // Thanks so much.

API

ngfaker.fake()

ngfaker contains a super useful generator method ngfaker.fake for combining ngfaker API methods using a mustache string format.

Example

console.log(ngfaker.fake("{{name.prefix}}, {{name.firstName}} {{name.lastName}}"));
// outputs: "Dr. Annabelle Smith"

This will interpolate the format string with the value of methods name.prefix(), name.lastName() and name.firstName().

API Methods

  • account
    • bank
    • accountNumber
  • address
    • state
    • states
    • localGovernment
    • localGovernments
  • lorem
    • word
    • phrase
  • name
    • firstName
    • lastName
    • prefix
    • fullName
  • phone
    • phoneNumber
    • serviceProvider
  • fake
  • random
    • boolean
    • number
    • arrayElement
    • objectElement
    • alphanumeric
    • hexadecimal

Localization

The default language locale is set to English.

Setting a new locale is simple:

var ngfaker = require('ng-faker');
// sets locale to yo (Yoruba)
ngfaker.setLocale("yo");
// or
ngfaker.locale = "yo";
  • yo - Yoruba
  • en - English
  • ha - hausa
  • ig - igbo
  • ek - Efik
  • bn - Benin
  • ur - urhobo

Other locales will be added soon...

Custom Locale

Adding a new locale is equally easy:

ngFaker.addLocale('ef', {
  title: 'Efik',
  name: [
    "Efik1", "Efik2"
  ],
  lorem: [],
  address: []
})

Tests

    npm run test

Version Release Schedule

If you require the absolute latest version of ng-faker the master branch on the official repo should always be up to date and working.

Maintainers

  • Bolaji Olajide
  • Rotimi Babalola
  • Oyindamola Subair

Contributors

| Rotimi Babalola| Bolaji Olajide | Subair Oyindamola | :---: | :---: | :---: | | Olamilekan Odukoya | Ayomiga | JCobhams | :---: | :---: | :---: | | Seun Faluyi | Neiva07 | nero-adaware | :---: | :---: | :---: | | sudo-kaizen

ng-faker was inspired by and has used data definitions and logic from: