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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sivar-utils

v1.5.0

Published

Utilidades para validar documentos salvadorenos

Downloads

251

Readme

Version Build Install Size Downloads PRs Welcome Commitizen friendly MIT License

All Contributors

Watch on GitHub Star on GitHub Tweet

Getting Started

Installation

npm install --save sivar-utils

Usage

  • isDUI

import { isDUI } from 'sivar-utils';

const str = 'test';
const fakeDUI = '00000000-0';
const validDUI = '02495046-3'; // DISCLAIMER: taken from Google

isDUI(str); // false
isDUI(fakeDUI); // false
isDUI(validDUI); // true
  • isNIT

import { isNIT } from 'sivar-utils';

const str = 'test';
const fakeNIT = '0000-000000-000-0';
const validNIT = '0614-051286-129-4'; // DISCLAIMER: taken from Google
const alsoValidNIT = '06140512861294';

isNIT(str); // false
isNIT(fakeNIT); // false
isNIT(validNIT); // true
isNIT(alsoValidNIT); // true
  • isMobilePhoneNumber

import { isMobilePhoneNumber } from 'sivar-utils';

const str = 'test';
const fakeMobilePhone = '9999-9999';
const validMobilePhone = '7071-1244'; // DISCLAIMER: taken from Google

isMobilePhoneNumber(str); // false
isMobilePhoneNumber(fakeMobilePhone); // false
isMobilePhoneNumber(validMobilePhone); // true
  • isResidentialPhoneNumber

import { isResidentialPhoneNumber } from 'sivar-utils';

const str = 'test';
const fakeResidentialPhone = '5555-5555';
const validResidentialPhone = '2244-4777'; // DISCLAIMER: taken from Google

isResidentialPhoneNumber(str); // false
isResidentialPhoneNumber(fakeResidentialPhone); // false
isResidentialPhoneNumber(validResidentialPhone); // true
  • isPhoneNumber

import { isPhoneNumber } from 'sivar-utils';

const str = 'test';
const fakePhone = '1234-5678';
const validPhone = '2591-3000'; /* or '7725-4747' */ // DISCLAIMER: taken from Google

isPhoneNumber(str); // false
isPhoneNumber(fakePhone); // false
isPhoneNumber(validPhone); // true
  • isPassport

import { isPassport } from 'sivar-utils';

const str = 'test';
const fakePassport = '$03766021';
const validPassport = 'A12345678';

isPassport(str); // false
isPassport(fakePassport); // false
isPassport(validPassport); // true
  • isCarPlate

import { isCarPlate } from 'sivar-utils';

const str = 'test';
const fakePlate = 'XY525929';
const validNationalPlate = 'N10731'; // DISCLAIMER: taken from Google
const validParticularPlate = 'p525929'; // DISCLAIMER: taken from Google

isCarPlate(str); // false
isCarPlate(fakePlate); // false
isCarPlate(validNationalPlate); // true
isCarPlate(validParticularPlate); // true

Contributing

How to contribute?

This is a commitizen friendly repository, so instead of creating commits using git commit, please use our custom CLI by running:

npm run cz

Formatting & Linting

Make sure you have installed the following plugins on your Code Editor

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © jonathanpalma