From 3a8a2c9ca90cef432224825b165687b1e76d6876 Mon Sep 17 00:00:00 2001 From: Fredrik Forsmo Date: Thu, 23 Mar 2023 21:17:44 +0100 Subject: [PATCH] Add valid output --- bin/personnummer | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/personnummer b/bin/personnummer index ec22d8b..5ad2875 100644 --- a/bin/personnummer +++ b/bin/personnummer @@ -14,7 +14,8 @@ const main = () => { try { const pnr = Personnummer.parse(argv[0]); - console.log(` Short format: ${pnr.format()} + console.log(` Valid: true + Short format: ${pnr.format()} Long format: ${pnr.format(true)} Age: ${pnr.getAge()} Sex: ${pnr.isMale() ? "male" : "female"}