Get full ean13 barcode with check digit if only 12 digits used
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Users can input 12 or 13 digits to generate an EAN13 barcode.
If they only use 12, how do I get the full code that includes the last check digit?
Seems like the `valid` callback would be a good place, but it seems to only return `true` or `false`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how EAN13 handles 12-digit input and how the `valid` callback is invoked. Confirm the desired public API for retrieving the generated check digit, then verify that the returned full barcode is correct for both 12- and 13-digit inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100