There was in issue with GTIN and EAN when the module remainder was zero. See Wikipedia for this special rule.
"Subtracted from 10, that leaves a result from 1 to 10. A zero replaces a ten, so, in all cases, a single check digit results."
Had to remove 0000000000000 === false from the tests, since technically it is now a valid GTIN/EAN. I also added a check that the value has to be numeric.
There was in issue with GTIN and EAN when the module remainder was zero. See Wikipedia for this special rule.
"Subtracted from 10, that leaves a result from 1 to 10. A zero replaces a ten, so, in all cases, a single check digit results."
Had to remove 0000000000000 === false from the tests, since technically it is now a valid GTIN/EAN. I also added a check that the value has to be numeric.