@agencebio/rosetta-cultures
Advanced tools
Comparing version 1.8.0 to 1.8.1
@@ -93,3 +93,3 @@ "use strict"; | ||
return cultures_pac.some(function (culture) { | ||
return culture.code === code && culture.precision === (precision !== null && precision !== void 0 ? precision : ''); | ||
return culture.code === code && culture.precision === (precision ? String(precision).padStart(3, '0') : ''); | ||
}); | ||
@@ -96,0 +96,0 @@ }); |
@@ -84,3 +84,3 @@ /** | ||
return cultures_pac.some(culture => { | ||
return culture.code === code && culture.precision === (precision ?? '') | ||
return culture.code === code && culture.precision === (precision ? String(precision).padStart(3, '0') : '') | ||
}) | ||
@@ -87,0 +87,0 @@ }) |
@@ -87,3 +87,7 @@ import { describe, it } from 'node:test' | ||
deepEqual(fromCodePacFirst('VRG').code_cpf, "01.22") // | ||
deepEqual(fromCodePacFirst('VRG', null).code_cpf, "01.22") // | ||
deepEqual(fromCodePacFirst('VRG', '001').code_cpf, "01.24.23") // Abricots | ||
deepEqual(fromCodePacFirst('VRG', '002').code_cpf, "01.25.31") // Amandes | ||
deepEqual(fromCodePacFirst('VRG', 1), fromCodePacFirst('VRG', '001')) // Abricots | ||
deepEqual(fromCodePacFirst('VRG', 2), fromCodePacFirst('VRG', '002')) // Amandes | ||
}) | ||
@@ -97,2 +101,3 @@ }) | ||
deepEqual(fromCodePacStrict('VRG').code_cpf, "01.2") | ||
deepEqual(fromCodePacStrict('VRG'), fromCodePacStrict('VRG', null)) | ||
}) | ||
@@ -99,0 +104,0 @@ |
{ | ||
"name": "@agencebio/rosetta-cultures", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "Traduction des codes cultures de la CPF vers la PAC vers des nomenclatures d'organismes de certification, et vice-versa.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2703777
91080