Project

ean13

0.02
No commit activity in last 3 years
No release in over 3 years
a (very) small library for working with EAN-13 codes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.0
 Project Readme

A small class for generating and validating EAN-13's, the 13 digit codes found on many products sold around the world.

Installation

gem install ean13

Usage

EAN13.new("0632737715836").valid?
=> true

EAN13.valid?("0632737715836")
=> true

EAN13.valid?("0632737715837")
=> false

EAN13.complete("063273771583")
=> "0632737715836"

EAN13.new("0632737715836").to_upc
=> "632737715836"

EAN13.new("0632737715836").to_gtin
=> "00632737715836"

Further Reading

Contributing

Source code is publicly available @ http://github.com/yob/ean13. Patches welcome, preferably via a git repo I can pull from.