Skip to content

Instantly share code, notes, and snippets.

View oskarnrk's full-sized avatar
💭
"Mi avvalgo della facoltà di non comprendere" (cit.)

Oscar Zambotti oskarnrk

💭
"Mi avvalgo della facoltà di non comprendere" (cit.)
View GitHub Profile
var http = require('http');
var url = require('url');
var path = require('path');
var fs = require('fs');
var port = process.argv[2] || 8080;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname;
var filename = path.join(process.cwd(), uri);
@oskarnrk
oskarnrk / isvalidfiscalcode.js
Last active April 29, 2021 06:43 — forked from massic80/isvalidfiscalcode.js
Check Italian Fiscal Code
const validFiscalCodeRegexp = /^([A-Za-z]{6}[\dlmnpqrstuvLMNPQRSTUV]{2}[abcdehlmprstABCDEHLMPRST]{1}[\dlmnpqrstuvLMNPQRSTUV]{2}[A-Za-z]{1}[\dlmnpqrstuvLMNPQRSTUV]{3}[A-Za-z]{1})$|(\d{11})$/;
const isValidFiscalCode = cf => validFiscalCodeRegexp.test(cf);