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

ve-check

v0.1.0

Published

Validar números de RIF de Venezuela.

Readme

Mi logo

ve-check

Biblioteca de JavaScript diseñada para validar números de Registro de Información Fiscal (RIF) utilizados en Venezuela. Esta herramienta es ideal para desarrolladores que trabajan con sistemas relacionados con datos fiscales o necesitan implementar validaciones específicas para el formato del RIF.

Validación de RIF

Esta librería está diseñada para validar el formato de los RIF (Registro de Información Fiscal) en Venezuela, asegurando que cumplan con las especificaciones establecidas por el SENIAT.

Características

  • Verifica que las letras iniciales sean válidas:
    • V, E y P para personas naturales.
    • C, G, J para personas jurídicas.
  • Valida que el número de verificación sea correcto antes de enviar el RIF al SENIAT.

Instalación

Puedes instalar la librería utilizando tu gestor de paquetes favorito:

npm install ve-check

Uso

A continuación, un ejemplo básico de cómo usar la librería:

const { validarRif } = require('ve-check')

const rifValido = validarRif('G200062975')

console.log(rifValido); // true o false dependiendo de la validez

Pruebas

/**
 * Imports the `validarRif` function from the main module.
 * 
 * @fileoverview Test file for validating RIF (Registro de Información Fiscal).
 * @requires ../index.js
 * @author [email protected]
 * @date 2023-10-06
 */
const { validarRif } = require("../index.js");

describe("isValidRif", () => {
    
    test("should return true for valid RIF", () => {
        //Rif de Digitel
        expect(validarRif("J304689713")).toBe(true);
        expect(validarRif("V158044150")).toBe(true);
        expect(validarRif("V-15.804.415-0")).toBe(true);
        expect(validarRif("V-6.011.457-5")).toBe(true);
        expect(validarRif("V-6.011.4575")).toBe(true);
        expect(validarRif("V-6.011-4575")).toBe(true);
        expect(validarRif("V-6-011-4575")).toBe(true);
        expect(validarRif("V6-011-4575")).toBe(true);
        //Rif de Corpocentro
        expect(validarRif("G200083433")).toBe(true);
        //Rif de la UNEFA
        expect(validarRif("G200062975")).toBe(true);
        //Rif del IUTEPAL
        expect(validarRif("J308810746")).toBe(true);
        expect(validarRif("J75387350")).toBe(true);
    })
    
 

})

Contribuciones

¡Las contribuciones son bienvenidas! Si encuentras un error o tienes una idea para mejorar la librería, no dudes en abrir un issue o enviar un pull request.

Licencia

Este proyecto está bajo la licencia MIT. Consulta el archivo LICENSE para más detalles.