EPC (Electronic Product Code) generator and parser for UHF RFID tags in TypeScript.
npm install @schie/epc





[![code style: prettier][prettier-badge]][prettier]
[![Commitizen friendly][commitizen-badge]][commitizen]
A modern, type-safe TypeScript library for generating and parsing EPC (Electronic Product Code) identifiers used in UHF RFID tags.
> โ ๏ธ Early Development Notice
> This library is under active early development. Until v1.0.0 is released, consider all releases potentially breaking. The API may change significantly between versions as we refine the design based on user feedback and real-world usage patterns.
- ๐งฉ EPC Generation - Create EPCs from GS1 components
- ๐ Parsing - Decode EPC hex into structured data
- ๐ก๏ธ Type Safe - Full TypeScript support with comprehensive types
- ๐ฆ Zero Dependencies - Lightweight and fast
- ๐งช Ready for Testing - Built for easy unit test coverage
``bash`
npm install @schie/epc
`typescript
import { encodeSgtin96, parseEpc } from '@schie/epc';
const epc = encodeSgtin96({
companyPrefix: '0614141',
itemReference: '812345',
serial: 6789,
filter: 3,
});
console.log(epc.hex);
console.log(epc.uri);
const parsed = parseEpc(epc.hex);
console.log(parsed.scheme); // sgtin-96
`
- ES Modules: Full ESM support with tree shaking
- CommonJS: CJS builds included for compatibility
- TypeScript: Complete type definitions included
- Node.js: Requires Node.js 20+
- SGTIN-96
- GID-96
Contributions are welcome! This project uses:
- TypeScript for type safety
- Jest for testing
- ESLint + Prettier for code quality
- Commitizen for conventional commits
`bashInstall dependencies
npm install
MIT License - see LICENSE file for details.
- NPM Package
- Translation Steps
- GitHub Repository
---
Made with โค๏ธ by @schie
[prettier-badge]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg
[prettier]: https://github.com/prettier/prettier
[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen]: http://commitizen.github.io/cz-cli/