Skip to content

Adding UPC.isValid#16

Merged
ashwanthkumar merged 2 commits intomasterfrom
upc-isvalid
Jun 13, 2018
Merged

Adding UPC.isValid#16
ashwanthkumar merged 2 commits intomasterfrom
upc-isvalid

Conversation

@ashwanthkumar
Copy link
Copy Markdown
Member

Today our internal isValidUPC checks if the input can be standardized and if yes, it returns true. It creates a kind of confusion because the UPCs passing the validator isn't a valid upc on it's own until it is standardized. For this purpose, I've added a UPC.isValid here itself which checks if the input and the standardized version of the input is the same.

I feel this makes the contract of isValidUPC more clear and don't assume that someone downstream should standardize the upc before consuming them.

@codingnirvana
Copy link
Copy Markdown

LGTM

@ashwanthkumar ashwanthkumar merged commit e52de1e into master Jun 13, 2018
@ashwanthkumar ashwanthkumar deleted the upc-isvalid branch June 13, 2018 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants