npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

colombia-id-parser

v1.0.0

Published

Parser para extraer datos de cédulas colombianas clásicas (PDF417), como nombres, apellidos, número de documento, etc.

Readme

🇨🇴 colombia-id-parser

Parser de cédulas colombianas clásicas (PDF417). Extrae y estructura automáticamente los datos personales codificados en el reverso de las cédulas amarillas con hologramas (Antiguas).

✨ Características

  • Parser de cédulas colombianas con PDF417
  • Extrae: nombres, apellidos, número de documento, fecha de nacimiento, tipo de sangre, género, código AFIS, tarjeta dactilar.

🚀 Instalación

pnpm add colombia-id-parser
# o
npm install colombia-id-parser
# o
yarn add colombia-id-parser

🧠 Uso básico

import { decodeColombianPdf417 } from 'colombia-id-parser';

const raw = '031312\u0000\u0000\u0000PubDSK_1\u0000\u0002C...'; // contenido del PDF417 leído de imagen

const data = decodeColombianPdf417(raw);

console.log(data);
/*
{
  source: 'pdf417',
  firstName: 'JOHN',
  middleName: '',
  lastName: 'FOO',
  secondLastName: 'BAR',
  birthDate: '11-10-1988',
  bloodType: 'O+',
  gender: 'M',
  documentInfo: {
    documentNumber: '1234567890',
    afisCode: '123456',
    fingerCard: '121212'
  }
}
*/

⚠️ Importante: Este parser espera como entrada una cadena de texto (string) obtenida a partir del análisis de una imagen del PDF417, por ejemplo, usando librerías como @zxig/browser o servicios de OCR que devuelvan el contenido en texto plano.

No es compatible directamente con los datos binarios o codificados que entregan algunos escáneres físicos de códigos de barras.

📌 Próximamente

Estamos trabajando en añadir soporte para otros formatos, como:

  • 🧪 MRZ (Machine Readable Zone) — para las nuevas cédulas digitales.

¡Si te interesa colaborar o necesitas una funcionalidad en específico, abre un issue o PR!

🛡️ Licencia

MIT © Andy Kenway

🤝 Contribuciones

Este proyecto está en evolución activa para ajustarse a necesidades reales. Agradecemos contribuciones mediante pull requests, reportes de bugs o sugerencias de nuevas funcionalidades.