You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: unknown format
at format (node_modules/sweden-national-id/dist/format.js:24:19)
at parse (node_modules/sweden-national-id/dist/national-id-number.js:24:50)
at isValidSSN (file:///home/perry/<snip>/bots/dist/test/projects/shared/library/ssn.js:6:20)
at validateStringWithoutPII (file:///home/perry/<snip>/bots/dist/test/projects/shared/schemaHelpers.js:136:13)
at Context.<anonymous> (file:///home/perry/<snip>/bots/dist/test/test/shared/unit/schemaHelpers.spec.js:40:20)
at process.processImmediate (node:internal/timers:478:21)
Value can be literally anything, and it breaks.
For instance, I was testing segments of a piece of text, looking for a Swedish SSN, and it broke on every value:
Receiving an unexpected error when trying to parse random strings. I'd expect it to return
null
like in the documentation, not throw an error:Value can be literally anything, and it breaks.
For instance, I was testing segments of a piece of text, looking for a Swedish SSN, and it broke on every value:
I'm using Node 20 under docker, with typescript v5.
The text was updated successfully, but these errors were encountered: