0.1.12 • Published 5 years ago
dcitalianfiscalcode v0.1.12
DCItalianFiscalCode
An Italian Fiscal Code generator available as Node.js modules.
Installation
Using npm:
$ npm i --save dcitalianfiscalcode
In Node.js:
// Load the module.
var fcUtility = require('dcitalianfiscalcode');
// get fiscal code passing data (gender is optional, we could pass undefined).
fcUtility.generateFiscalCode(surname, name, birthYear, birthMonth, birthDay, gender, birthPlace);
// get fiscal code info passing fiscal code.
const info = fcUtility.getFiscalCodeInfo (fiscalCode)
// access info
console.log(info.birthPlace);
console.log(info.birthProvince);
If gender is not passed as parameter, this module will try to detect it automatically using name
Feature
- fiscal code generation starting from user's info
- gender auto-detection using name
- extract birth info from fiscal code (birthPlace, birthProvince) See the package source for more details.