https://github.com/schie/epc
parsing and creating EPCs
https://github.com/schie/epc
epc rfid typescript
Last synced: 5 months ago
JSON representation
parsing and creating EPCs
- Host: GitHub
- URL: https://github.com/schie/epc
- Owner: schie
- License: mit
- Created: 2026-01-11T18:31:08.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-11T23:01:38.000Z (5 months ago)
- Last Synced: 2026-01-12T02:28:54.122Z (5 months ago)
- Topics: epc, rfid, typescript
- Language: TypeScript
- Homepage: https://epc.schie.io/
- Size: 313 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# @schie/epc
[](https://www.npmjs.com/package/@schie/epc)
[](https://github.com/schie/epc/actions/workflows/ci.yml)
[](https://github.com/schie/epc/actions/workflows/github-code-scanning/codeql)
[](https://github.com/schie/epc/actions/workflows/super-linter.yml)
[](https://www.typescriptlang.org/)
[](https://codecov.io/gh/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.
## โจ Features
- ๐งฉ **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
## ๐ Quick Start
### Installation
```bash
npm install @schie/epc
```
### Basic Usage
```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
```
## ๐ฆ Package Information
- **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+
## ๐งพ Supported Schemes
- SGTIN-96
- GID-96
## ๐ค Contributing
Contributions are welcome! This project uses:
- **TypeScript** for type safety
- **Jest** for testing
- **ESLint + Prettier** for code quality
- **Commitizen** for conventional commits
```bash
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
# Lint
npm run lint
```
## ๐ License
MIT License - see [LICENSE](LICENSE) file for details.
## ๐ Links
- [NPM Package](https://www.npmjs.com/package/@schie/epc)
- [Translation Steps](translation-steps.md)
- [GitHub Repository](https://github.com/schie/epc)
---
Made with โค๏ธ by [@schie](https://github.com/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/