griit
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

griit

Random generator of Italian identities for testing purposes

Overview

If you need a fake random italian identity generator to test your identity hungry app, this may be what you are looking for.

Installation

npm install griit

Usage

Here's an example for a base angular project

import { Component, OnInit } from '@angular/core';
import { Griit } from 'griit';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'griit-example';
  private generatore: Griit = new Griit();
  public persona: any;

  ngOnInit() {
    this.persona = this.generatore.getPersonaRandom();

    console.log(this.persona);
  }
}

And this is the output:

{
    "cognome": "Greco",
    "nome": "Ginevra",
    "sesso": "F",
    "giornoDiNascita": 22,
    "meseDiNascita": 11,
    "annoDiNascita": "86",
    "comuneDiNascita": "GIOIOSA MAREA",
    "provinciaDiNascita": "ME",
    "codiceFiscale": "GRCGVR86S62E043E"
}

enjoy :-)

Package Sidebar

Install

npm i griit

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

542 kB

Total Files

13

Last publish

Collaborators

  • steven.exe