Repository navigation
Releases
Releases · brielov/cuit
v2.0.2
Fixed
isValidaccepted numbers whose checksum has no valid check digit (remainder 1) when they
ended in0, such as30-69345023-0(#84).generate(dni, "E")returned an invalid30-…-0CUIT where ARCA assigns prefix33; it now
returns33-…-9, e.g.generate("69345023", "E")is"33693450239"
(#84).getEntityTypereported women's23-…-4CUITs as male; for prefix23the check digit now
decides.isValidthrew aTypeErrorfor numbers and arrays (for example a CUIT stored as a number);
it now returnsfalsefor any non-string.- The CommonJS build required
node:module, which browser bundlers cannot resolve. - Several README and JSDoc examples showed wrong results.
Changed
- The
CuitPrefixtype includes"33", whichgeneratecan now return. isValidandgenerateare about 30% faster on Node and 40–55% faster on Bun.
Notes
- Version 2.0.1 on npm was published from a commit that is not in this repository and still
has the #84 bug. From 2.0.2 on, releases are
published by CI with npm provenance.
Install: npm install cuit@2.0.2. Published from CI with npm provenance.