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

4devs

v1.5.1

Published

Validate and generate various data 🚀✅

Downloads

138

Readme

under development, everything in the documentation is already implemented and working

Quick Start

npm package that generates and validates: Birth Certificate, CNH, Bank Account, CPF, Resume, Nicks, PIS/PASEP, CNPJ, CEP, RG, Voter Title, Credit Card, documents of people, Image and much more...

import { CPF } from '4devs';

const { cpf } = await CPF.generate(); // 34317074087

await CPF.validate({ cpf: '999.999.999-99' }); // false

Installation

pnpm

pnpm add 4devs

yarn

yarn add 4devs

npm

npm install --save 4devs

Navigation

Docs:

here you can see the documentation of all the features already implemented

CPF:

CPF is one of the classes that 4devs has, this class is able to generate and validate a cpf based on the services on the pages https://www.4devs.com.br/gerador_de_cpf and https://www.4devs.com.br/validador_cpf

validate a CPF

import { CPF } from '4devs';

const { isValid } = await CPF.validate({ cpf: '577.572.660-09' });

parameters:

  • cpf (required) the CPF you want to validate

return:

{
  isValid: boolean;
}

RG:

RG is one of the classes that 4devs has, this class is able to generate and validate a rg based on the services on the pages https://www.4devs.com.br/gerador_de_cpf and https://www.4devs.com.br/validador_rg

validate a RG

import { RG } from '4devs';

const { isValid } = await RG.validate({ rg: '30.737.817-2' });

parameters:

  • rg (required) the RG you want to validate

return:

{
  isValid: boolean;
}

generate a new RG

import { RG } from '4devs';

const { rg } = await RG.generate({ isWithDots: true, stateCode: 'BA' });

parameters:

  • isWithDots (optional) if true the RG will be generated with dots example: 30.737.817-2 if not generated without example: 307378172

  • stateCode (optional) code of the state where the RG belongs, example: "BA" or "SP"

return:

{
  rg: string;
}

Certificates:

Certificates is one of the classes that 4devs has, this class is able to generate and validate a certificates based on the services on the pages https://www.4devs.com.br/validador_certidoes and https://www.4devs.com.br/gerador_numero_certidoes

validate a Certificates

import { Certificates } from '4devs';

const { isValid } = await Certificates.validate({
  certificate: '107211 01 55 2018 1 07592 378 3808990-80',
});

parameters:

  • certificate (required) the certificate you want to validate

return:

{
  isValid: boolean;
}

generate a new Certificate

import { Certificates } from '4devs';

const { certificate } = await Certificates.generate({
  isWithDots: true,
  type: 'BIRTH',
});

parameters:

  • isWithDots (optional) if true the certificate will be generated with dots example: 107211 01 55 2018 1 07592 378 3808990-80 if not generated without example: 21931801552017107907909207153815

  • type (optional) the certificate type, can be: 'BIRTH' | 'WEDDING' | 'RELIGIOUS_MARRIAGE' | 'DEATH'

return:

{
  certificate: string;
}

CNH:

CNH is one of the classes that 4devs has, this class is able to generate and validate a CNH based on the services on the pages https://www.4devs.com.br/validador_cnh and https://www.4devs.com.br/gerador_de_cnh

validate a CNH

import { CNH } from '4devs';

const { isValid } = await CNH.validate({
  cnh: '79973493843',
});

parameters:

  • cnh (required) the cnh you want to validate

return:

{
  isValid: boolean;
}

generate a new CNH

import { CNH } from '4devs';

const { cnh } = await CNH.generate();

return:

{
  cnh: string;
}

Footer:

This package is created using the website https://www.4devs.com.br. but the site has no responsibility for this content it was made in an open source way and without contacting the site.