Codici Fiscali Validi
Generazione automatica basata su nome, data e luogo di nascita
diff --git a/github-pages/404.html b/github-pages/404.html deleted file mode 100644 index 2a7b073..0000000 --- a/github-pages/404.html +++ /dev/null @@ -1,22 +0,0 @@ - - -
- - -This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main useData()
API can be used to access site, theme, and page data for the current page. It works in both .md
and .vue
files:
<script setup>
-import { useData } from 'vitepress'
-
-const { theme, page, frontmatter } = useData()
-</script>
-
-## Results
-
-### Theme Data
-<pre>{{ theme }}</pre>
-
-### Page Data
-<pre>{{ page }}</pre>
-
-### Page Frontmatter
-<pre>{{ frontmatter }}</pre>
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main useData()
API can be used to access site, theme, and page data for the current page. It works in both .md
and .vue
files:
<script setup>
-import { useData } from 'vitepress'
-
-const { theme, page, frontmatter } = useData()
-</script>
-
-## Results
-
-### Theme Data
-<pre>{{ theme }}</pre>
-
-### Page Data
-<pre>{{ page }}</pre>
-
-### Page Frontmatter
-<pre>{{ frontmatter }}</pre>
Generate consistent Italian people data including names, surnames, and fiscal codes based on real demographic distributions.
Generate realistic Italian first names based on national frequency distribution data from ISTAT.
import { faker } from '@fakerjs/it'
-
-// Generate a random first name
-faker.person.firstName() // => "Marco"
-
-// Generate a male first name
-faker.person.firstName('male') // => "Giuseppe"
-
-// Generate a female first name
-faker.person.firstName('female') // => "Anna"
-
-// Generate multiple names
-faker.person.firstNames(3) // => ["Marco", "Giuseppe", "Luigi"]
-
-// Generate with options
-faker.person.firstName({
- gender: 'female',
- region: 'Lombardia', // Regional frequency if available
- birthYear: 1980 // Name popularity for that year
-})
firstName(options?: PersonOptions)
Generates a single Italian first name.
Options:
| | gender
| 'male' \\| 'female'
| Specify gender for the name | | region
| string
| Italian region for regional frequency | | birthYear
| number
| Year of birth for historical name frequency |
Returns: string
firstNames(count: number, options?: PersonOptions)
Generates multiple Italian first names.
Returns: string[]
Generate Italian surnames based on provincial frequency distributions from ISTAT data.
// Generate a random surname
-faker.person.lastName() // => "Rossi"
-
-// Generate with provincial frequency
-faker.person.lastName({
- province: 'MI' // Uses Milan province distribution
-}) // => "Colombo"
-
-// Generate multiple surnames
-faker.person.lastNames(3) // => ["Rossi", "Ferrari", "Bianchi"]
lastName(options?: SurnameOptions)
Generates a single Italian surname.
Options:
| | province
| string
| Italian province code for local frequency | | region
| string
| Italian region for regional frequency |
Returns: string
lastNames(count: number, options?: SurnameOptions)
Generates multiple Italian surnames.
Returns: string[]
Generate valid Italian fiscal codes (Codice Fiscale) consistent with the person's data.
// Generate a random fiscal code
-faker.person.fiscalCode() // => "RSSMRA80A01H501U"
-
-// Generate fiscal code with specific person data
-faker.person.fiscalCode({
- firstName: 'Mario',
- lastName: 'Rossi',
- gender: 'male',
- birthDate: '1980-01-01',
- birthPlace: 'Roma'
-}) // => "RSSMRA80A01H501U"
-
-// Validate a fiscal code
-faker.person.validateFiscalCode('RSSMRA80A01H501U') // => true
fiscalCode(options?: FiscalCodeOptions)
Generates a valid Italian fiscal code.
Options:
| | firstName
| string
| Person's first name | | lastName
| string
| Person's last name | | gender
| 'male' \\| 'female'
| Person's gender | | birthDate
| string \\| Date
| Date of birth | | birthPlace
| string
| Place of birth (municipality) |
Returns: string
validateFiscalCode(code: string)
Validates an Italian fiscal code.
Returns: boolean
TIP
Use faker.seed()
to generate consistent data across multiple runs
WARNING
While the generated data follows real demographic distributions, it should only be used for testing purposes
Generate consistent Italian people data including names, surnames, and fiscal codes based on real demographic distributions.
Generate realistic Italian first names based on national frequency distribution data from ISTAT.
import { faker } from '@fakerjs/it'
-
-// Generate a random first name
-faker.person.firstName() // => "Marco"
-
-// Generate a male first name
-faker.person.firstName('male') // => "Giuseppe"
-
-// Generate a female first name
-faker.person.firstName('female') // => "Anna"
-
-// Generate multiple names
-faker.person.firstNames(3) // => ["Marco", "Giuseppe", "Luigi"]
-
-// Generate with options
-faker.person.firstName({
- gender: 'female',
- region: 'Lombardia', // Regional frequency if available
- birthYear: 1980 // Name popularity for that year
-})
firstName(options?: PersonOptions)
Generates a single Italian first name.
Options:
| | gender
| 'male' \\| 'female'
| Specify gender for the name | | region
| string
| Italian region for regional frequency | | birthYear
| number
| Year of birth for historical name frequency |
Returns: string
firstNames(count: number, options?: PersonOptions)
Generates multiple Italian first names.
Returns: string[]
Generate Italian surnames based on provincial frequency distributions from ISTAT data.
// Generate a random surname
-faker.person.lastName() // => "Rossi"
-
-// Generate with provincial frequency
-faker.person.lastName({
- province: 'MI' // Uses Milan province distribution
-}) // => "Colombo"
-
-// Generate multiple surnames
-faker.person.lastNames(3) // => ["Rossi", "Ferrari", "Bianchi"]
lastName(options?: SurnameOptions)
Generates a single Italian surname.
Options:
| | province
| string
| Italian province code for local frequency | | region
| string
| Italian region for regional frequency |
Returns: string
lastNames(count: number, options?: SurnameOptions)
Generates multiple Italian surnames.
Returns: string[]
Generate valid Italian fiscal codes (Codice Fiscale) consistent with the person's data.
// Generate a random fiscal code
-faker.person.fiscalCode() // => "RSSMRA80A01H501U"
-
-// Generate fiscal code with specific person data
-faker.person.fiscalCode({
- firstName: 'Mario',
- lastName: 'Rossi',
- gender: 'male',
- birthDate: '1980-01-01',
- birthPlace: 'Roma'
-}) // => "RSSMRA80A01H501U"
-
-// Validate a fiscal code
-faker.person.validateFiscalCode('RSSMRA80A01H501U') // => true
fiscalCode(options?: FiscalCodeOptions)
Generates a valid Italian fiscal code.
Options:
| | firstName
| string
| Person's first name | | lastName
| string
| Person's last name | | gender
| 'male' \\| 'female'
| Person's gender | | birthDate
| string \\| Date
| Date of birth | | birthPlace
| string
| Place of birth (municipality) |
Returns: string
validateFiscalCode(code: string)
Validates an Italian fiscal code.
Returns: boolean
TIP
Use faker.seed()
to generate consistent data across multiple runs
WARNING
While the generated data follows real demographic distributions, it should only be used for testing purposes
IT-Faker is a specialized data generation library built on top of Faker.js, specifically designed for generating realistic Italian data. It provides coherent and statistically accurate data generation for Italian names, addresses, fiscal codes, and more.
# Using npm
-npm install @italia-tools/faker
-
-# Using yarn
-yarn add @italia-tools/faker
-
-# Using pnpm
-pnpm add @italia-tools/faker
import { itFaker } from '@italia-tools/faker';
// Generate a complete person with consistent data
-const person = itFaker.itPerson.generatePerson();
-// Returns an object with name, surname, fiscal code, and address
-// All data is coherent (e.g., fiscal code matches the person's details)
-
-// Generate individual components
-const name = itFaker.itPerson.firstName({ gender: 'female'}); // Statistically accurate Italian first name
-const surname = itFaker.itPerson.lastName(); // Random last name
-const fullName = itFaker.itPerson.fullName({ gender: 'male'}); // Full name
-const fiscalCode = itFaker.itPerson.fiscalCode(); // Valid Italian fiscal code
-const localPerson = itFaker.itPerson.generatePerson({ province: 'Bolzano' }); // Last name based on the actual distribution in the province
// Generate coherent geographic data
-const address = itFaker.itPlace.fullAddress();
-// Returns a complete Italian address with consistent city, province, and region
-
-// Generate specific location components
-const randomCity = itFaker.itPlace.randomCity(); // Real Italian city with name, code, zone, province and region
-const cityByRegion = itFaker.itPlace.city({ region: 'Lombardia' }); // City matching the region/province
-const region = itFaker.places.region(); // Random italian region
IT-Faker is written in TypeScript and provides full type definitions out of the box. All generated data comes with proper typing:
interface Person {
- firstName: string;
- lastName: string;
- fiscalCode: string;
- address: Address;
-}
-
-interface Address {
- street: string;
- city: string;
- province: string;
- region: string;
- zipCode: string;
-}
Although we recommend using IT-Faker as it takes into account the actual Italian statistical distribution of data, you can still use the standard Faker.js methods. IT-Faker extends Faker.js's Italian locale by adding functionalities specific to the Italian context. You can use it alongside standard Faker.js methods, taking advantage of both the basic features and specialized Italian data generation.:
// Mix IT-Faker with regular Faker.js methods
-const phoneNumber = itFaker.itPerson.firstName(); // IT-Faker format
-const email = itFaker.person.firstName(); // Regular Faker.js method
IT-Faker is a specialized data generation library built on top of Faker.js, specifically designed for generating realistic Italian data. It provides coherent and statistically accurate data generation for Italian names, addresses, fiscal codes, and more.
# Using npm
-npm install @italia-tools/faker
-
-# Using yarn
-yarn add @italia-tools/faker
-
-# Using pnpm
-pnpm add @italia-tools/faker
import { itFaker } from '@italia-tools/faker';
// Generate a complete person with consistent data
-const person = itFaker.itPerson.generatePerson();
-// Returns an object with name, surname, fiscal code, and address
-// All data is coherent (e.g., fiscal code matches the person's details)
-
-// Generate individual components
-const name = itFaker.itPerson.firstName({ gender: 'female'}); // Statistically accurate Italian first name
-const surname = itFaker.itPerson.lastName(); // Random last name
-const fullName = itFaker.itPerson.fullName({ gender: 'male'}); // Full name
-const fiscalCode = itFaker.itPerson.fiscalCode(); // Valid Italian fiscal code
-const localPerson = itFaker.itPerson.generatePerson({ province: 'Bolzano' }); // Last name based on the actual distribution in the province
// Generate coherent geographic data
-const address = itFaker.itPlace.fullAddress();
-// Returns a complete Italian address with consistent city, province, and region
-
-// Generate specific location components
-const randomCity = itFaker.itPlace.randomCity(); // Real Italian city with name, code, zone, province and region
-const cityByRegion = itFaker.itPlace.city({ region: 'Lombardia' }); // City matching the region/province
-const region = itFaker.places.region(); // Random italian region
IT-Faker is written in TypeScript and provides full type definitions out of the box. All generated data comes with proper typing:
interface Person {
- firstName: string;
- lastName: string;
- fiscalCode: string;
- address: Address;
-}
-
-interface Address {
- street: string;
- city: string;
- province: string;
- region: string;
- zipCode: string;
-}
Although we recommend using IT-Faker as it takes into account the actual Italian statistical distribution of data, you can still use the standard Faker.js methods. IT-Faker extends Faker.js's Italian locale by adding functionalities specific to the Italian context. You can use it alongside standard Faker.js methods, taking advantage of both the basic features and specialized Italian data generation.:
// Mix IT-Faker with regular Faker.js methods
-const phoneNumber = itFaker.itPerson.firstName(); // IT-Faker format
-const email = itFaker.person.firstName(); // Regular Faker.js method
You can install IT-Faker using your preferred package manager:
npm install @italia-tools/faker
yarn add @italia-tools/faker
pnpm add @italia-tools/faker
IT-Faker includes TypeScript definitions out of the box. No additional types package is needed.
// tsconfig.json
-{
- "compilerOptions": {
- "esModuleInterop": true,
- // ... rest of your config
- }
-}
import { itFaker } from '@italia-tools/faker';
const { itFaker } = require('@italia-tools/faker');
To verify your installation, you can run this simple test:
import { itFaker } from '@italia-tools/faker';
-
-// Should generate an Italian name
-console.log(itFaker.names.firstName());
You can install IT-Faker using your preferred package manager:
npm install @italia-tools/faker
yarn add @italia-tools/faker
pnpm add @italia-tools/faker
IT-Faker includes TypeScript definitions out of the box. No additional types package is needed.
// tsconfig.json
-{
- "compilerOptions": {
- "esModuleInterop": true,
- // ... rest of your config
- }
-}
import { itFaker } from '@italia-tools/faker';
const { itFaker } = require('@italia-tools/faker');
To verify your installation, you can run this simple test:
import { itFaker } from '@italia-tools/faker';
-
-// Should generate an Italian name
-console.log(itFaker.names.firstName());
This page demonstrates some of the built-in markdown extensions provided by VitePress.
VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:
Input
\`\`\`js{4}
-export default {
- data () {
- return {
- msg: 'Highlighted!'
- }
- }
-}
-\`\`\`
Output
export default {
- data () {
- return {
- msg: 'Highlighted!'
- }
- }
-}
Input
::: info
-This is an info box.
-:::
-
-::: tip
-This is a tip.
-:::
-
-::: warning
-This is a warning.
-:::
-
-::: danger
-This is a dangerous warning.
-:::
-
-::: details
-This is a details block.
-:::
Output
INFO
This is an info box.
TIP
This is a tip.
WARNING
This is a warning.
DANGER
This is a dangerous warning.
This is a details block.
Check out the documentation for the full list of markdown extensions.
`,19)]))}const c=a(e,[["render",l]]);export{E as __pageData,c as default}; diff --git a/github-pages/assets/markdown-examples.md.Cl3fQzs5.lean.js b/github-pages/assets/markdown-examples.md.Cl3fQzs5.lean.js deleted file mode 100644 index d0dd969..0000000 --- a/github-pages/assets/markdown-examples.md.Cl3fQzs5.lean.js +++ /dev/null @@ -1,33 +0,0 @@ -import{_ as a,b as i,a5 as n,a as t}from"./chunks/framework.S3blM4FA.js";const E=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"markdown-examples.md","filePath":"markdown-examples.md"}'),e={name:"markdown-examples.md"};function l(p,s,h,k,r,d){return t(),i("div",null,s[0]||(s[0]=[n(`This page demonstrates some of the built-in markdown extensions provided by VitePress.
VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:
Input
\`\`\`js{4}
-export default {
- data () {
- return {
- msg: 'Highlighted!'
- }
- }
-}
-\`\`\`
Output
export default {
- data () {
- return {
- msg: 'Highlighted!'
- }
- }
-}
Input
::: info
-This is an info box.
-:::
-
-::: tip
-This is a tip.
-:::
-
-::: warning
-This is a warning.
-:::
-
-::: danger
-This is a dangerous warning.
-:::
-
-::: details
-This is a details block.
-:::
Output
INFO
This is an info box.
TIP
This is a tip.
WARNING
This is a warning.
DANGER
This is a dangerous warning.
This is a details block.
Check out the documentation for the full list of markdown extensions.
`,19)]))}const c=a(e,[["render",l]]);export{E as __pageData,c as default}; diff --git a/github-pages/assets/person.md.hT9lmS4m.js b/github-pages/assets/person.md.hT9lmS4m.js deleted file mode 100644 index 1a8a0cf..0000000 --- a/github-pages/assets/person.md.hT9lmS4m.js +++ /dev/null @@ -1,51 +0,0 @@ -import{_ as t}from"./chunks/theme.B9zUgLdG.js";import{b as p,a5 as a,L as i,q as l,I as h,a as k}from"./chunks/framework.S3blM4FA.js";const y=JSON.parse('{"title":"Italian Person Module","description":"","frontmatter":{},"headers":[],"relativePath":"person.md","filePath":"person.md"}'),r={name:"person.md"},c=Object.assign(r,{setup(d){return(E,s)=>{const e=h("ClientOnly"),n=h("view-source");return k(),p("div",null,[s[0]||(s[0]=a(`The ItPersonModule
provides methods for generating realistic personal data in the Italian context, including names, fiscal codes, email addresses, and phone numbers.
npm install @it-faker
import { ItFaker } from 'it-faker';
-
-const faker = new ItFaker();
Generates an Italian first name. If gender is specified, returns a male or female name accordingly.
const faker = new ItFaker();
-
-console.log(faker.it.person.firstName('male')); // 'Marco'
-console.log(faker.it.person.firstName('female')); // 'Giulia'
Genera un cognome italiano comune.
const faker = new ItFaker();
-
-console.log(faker.it.person.lastName()); // 'Rossi'
Generates a common Italian surname.
const faker = new ItFaker();
-
-console.log(faker.it.person.lastName()); // 'Rossi'
Generates a complete Italian name, optionally specifying gender.
const faker = new ItFaker();
-
-console.log(faker.it.person.fullName('male')); // 'Marco Rossi'
-console.log(faker.it.person.fullName('female')); // 'Giulia Bianchi'
Generates an Italian professional title appropriate to the gender.
const faker = new ItFaker();
-
-console.log(faker.it.person.prefix('male')); // 'Dott.'
-console.log(faker.it.person.prefix('female')); // 'Dott.ssa'
Generates a complete name with professional title.
const faker = new ItFaker();
-
-console.log(faker.it.person.fullNameWithTitle('male')); // 'Dott. Marco Rossi'
-console.log(faker.it.person.fullNameWithTitle('female')); // 'Dott.ssa Giulia Bianchi'
Generates a valid Italian fiscal code based on random personal data.
const faker = new ItFaker();
-
-console.log(faker.it.person.fiscalCode()); // 'RSSMRC80A01H501X'
Generates an Italian city of birth.
const faker = new ItFaker();
-
-console.log(faker.it.person.birthPlace()); // 'Roma'
Returns an object containing the name and code of an Italian province.
const faker = new ItFaker();
-
-console.log(faker.it.person.province()); // { name: 'Roma', code: 'RM' }
Generates a random birth date between 1950 and 2005.
const faker = new ItFaker();
-
-console.log(faker.it.person.birthDate()); // 1980-01-01T00:00:00.000Z
Generates a valid Italian mobile phone number.
const faker = new ItFaker();
-
-console.log(faker.it.person.phone()); // '3201234567'
Generates a valid Italian landline phone number.
const faker = new ItFaker();
-
-console.log(faker.it.person.landline()); // '0612345678'
Generates an email address optionally based on specific first and last names.
const faker = new ItFaker();
-
-console.log(faker.it.person.email()); // 'marco.rossi@gmail.com'
-console.log(faker.it.person.email('giuseppe', 'verdi')); // 'giuseppe.verdi@libero.it'
Generates a PEC (Certified Electronic Mail) address optionally based on specific first and last names.
const faker = new ItFaker();
-
-console.log(faker.it.person.pec()); // 'marco.rossi@pec.it'
-console.log(faker.it.person.pec('giuseppe', 'verdi')); // 'giuseppe.verdi@legalmail.it'
Here's an example that uses various module methods to generate a complete personal profile:
const faker = new ItFaker();
-
-const profile = {
- title: faker.it.person.prefix('male'),
- fullName: faker.it.person.fullName('male'),
- fiscalCode: faker.it.person.fiscalCode(),
- birthDate: faker.it.person.birthDate(),
- birthPlace: faker.it.person.birthPlace(),
- province: faker.it.person.province(),
- phone: faker.it.person.phone(),
- email: faker.it.person.email(),
- pec: faker.it.person.pec()
-};
-
-console.log(JSON.stringify(profile, null, 2));
The ItPersonModule
provides methods for generating realistic personal data in the Italian context, including names, fiscal codes, email addresses, and phone numbers.
npm install @it-faker
import { ItFaker } from 'it-faker';
-
-const faker = new ItFaker();
Generates an Italian first name. If gender is specified, returns a male or female name accordingly.
const faker = new ItFaker();
-
-console.log(faker.it.person.firstName('male')); // 'Marco'
-console.log(faker.it.person.firstName('female')); // 'Giulia'
Genera un cognome italiano comune.
const faker = new ItFaker();
-
-console.log(faker.it.person.lastName()); // 'Rossi'
Generates a common Italian surname.
const faker = new ItFaker();
-
-console.log(faker.it.person.lastName()); // 'Rossi'
Generates a complete Italian name, optionally specifying gender.
const faker = new ItFaker();
-
-console.log(faker.it.person.fullName('male')); // 'Marco Rossi'
-console.log(faker.it.person.fullName('female')); // 'Giulia Bianchi'
Generates an Italian professional title appropriate to the gender.
const faker = new ItFaker();
-
-console.log(faker.it.person.prefix('male')); // 'Dott.'
-console.log(faker.it.person.prefix('female')); // 'Dott.ssa'
Generates a complete name with professional title.
const faker = new ItFaker();
-
-console.log(faker.it.person.fullNameWithTitle('male')); // 'Dott. Marco Rossi'
-console.log(faker.it.person.fullNameWithTitle('female')); // 'Dott.ssa Giulia Bianchi'
Generates a valid Italian fiscal code based on random personal data.
const faker = new ItFaker();
-
-console.log(faker.it.person.fiscalCode()); // 'RSSMRC80A01H501X'
Generates an Italian city of birth.
const faker = new ItFaker();
-
-console.log(faker.it.person.birthPlace()); // 'Roma'
Returns an object containing the name and code of an Italian province.
const faker = new ItFaker();
-
-console.log(faker.it.person.province()); // { name: 'Roma', code: 'RM' }
Generates a random birth date between 1950 and 2005.
const faker = new ItFaker();
-
-console.log(faker.it.person.birthDate()); // 1980-01-01T00:00:00.000Z
Generates a valid Italian mobile phone number.
const faker = new ItFaker();
-
-console.log(faker.it.person.phone()); // '3201234567'
Generates a valid Italian landline phone number.
const faker = new ItFaker();
-
-console.log(faker.it.person.landline()); // '0612345678'
Generates an email address optionally based on specific first and last names.
const faker = new ItFaker();
-
-console.log(faker.it.person.email()); // 'marco.rossi@gmail.com'
-console.log(faker.it.person.email('giuseppe', 'verdi')); // 'giuseppe.verdi@libero.it'
Generates a PEC (Certified Electronic Mail) address optionally based on specific first and last names.
const faker = new ItFaker();
-
-console.log(faker.it.person.pec()); // 'marco.rossi@pec.it'
-console.log(faker.it.person.pec('giuseppe', 'verdi')); // 'giuseppe.verdi@legalmail.it'
Here's an example that uses various module methods to generate a complete personal profile:
const faker = new ItFaker();
-
-const profile = {
- title: faker.it.person.prefix('male'),
- fullName: faker.it.person.fullName('male'),
- fiscalCode: faker.it.person.fiscalCode(),
- birthDate: faker.it.person.birthDate(),
- birthPlace: faker.it.person.birthPlace(),
- province: faker.it.person.province(),
- phone: faker.it.person.phone(),
- email: faker.it.person.email(),
- pec: faker.it.person.pec()
-};
-
-console.log(JSON.stringify(profile, null, 2));
Generatore di dati italiani realistici basato su Faker.js
Genera dati italiani consistenti per i tuoi test