Project

ean8

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

Development

>= 0
~> 3.0
 Project Readme

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

Installation

gem install ean8

Usage

EAN8.new("93469647").valid?
=> true

EAN8.valid?("93469647")
=> true

EAN8.valid?("93469646")
=> false

EAN8.complete("9346964")
=> "93469647"

EAN8.new("93469647").to_ean
=> "0000093469647"

EAN8.new("93469647").to_gtin
=> "00000093469647"

Further Reading

Contributing

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