mirror of
https://github.com/danog/CodiceFiscaleJS.git
synced 2024-11-30 04:29:11 +01:00
Removed pad function
This commit is contained in:
parent
b114ba9693
commit
89b66b8fbf
2
dist/codice.fiscale.amd.js
vendored
2
dist/codice.fiscale.amd.js
vendored
File diff suppressed because one or more lines are too long
2
dist/codice.fiscale.commonjs2.js
vendored
2
dist/codice.fiscale.commonjs2.js
vendored
File diff suppressed because one or more lines are too long
2
dist/codice.fiscale.umd.js
vendored
2
dist/codice.fiscale.umd.js
vendored
File diff suppressed because one or more lines are too long
2
dist/codice.fiscale.var.js
vendored
2
dist/codice.fiscale.var.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -57,16 +57,7 @@ function extractConsonants(str) {
|
||||
return str.replace(/[^BCDFGHJKLMNPQRSTVWXYZ]/gi, '');
|
||||
}
|
||||
|
||||
function pad(n) {
|
||||
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
||||
var s = String(n);
|
||||
|
||||
while (s.length < size) {
|
||||
s = "0".concat(s);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
function birthplaceFields(provinceSelector, birthplaceSelector) {
|
||||
var provinceSelect = document.querySelector(provinceSelector);
|
||||
|
@ -41,13 +41,6 @@ export function extractVowels (str) {
|
||||
export function extractConsonants (str) {
|
||||
return str.replace(/[^BCDFGHJKLMNPQRSTVWXYZ]/gi, '')
|
||||
}
|
||||
export function pad (n, size = 2) {
|
||||
let s = String(n)
|
||||
while (s.length < size) {
|
||||
s = `0${s}`
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
export function birthplaceFields (provinceSelector, birthplaceSelector) {
|
||||
const provinceSelect = document.querySelector(provinceSelector)
|
||||
|
@ -299,5 +299,9 @@ describe('Calcolo codice fiscale inverso -> metodo .computeInverse per le donne'
|
||||
expect(CodiceFiscale.computeInverse(maria_rossi_cf).year).toBe(1980);
|
||||
})
|
||||
|
||||
test('la data corretta', () => {
|
||||
expect(CodiceFiscale.computeInverse(maria_rossi_cf).birthday).toBe("1980-06-23");
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user