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

person_registration

v0.1.2

Published

Person registration for Brazil documents

Readme

Person Registration

Overview

Person Registration is a powerful tool designed to simplify the generation of realistic Brazilian identification documents for testing purposes. Whether you're working with physical person (CPF) or juridical person (CNPJ) registrations, this library provides an easy-to-use CLI and API for Rust and Node.js projects.

Use this tool to simulate scenarios like creating test users, validating systems, or integrating third-party services. Contributions are welcome to expand its functionality!


Features

  • Generate CPF and CNPJ numbers: Quickly produce valid-looking Brazilian documents for testing.
  • Flexible usage: Use as a CLI tool or integrate directly into your Rust or Node.js application.
  • Cross-language support: Works seamlessly with Rust and Node.js.

Installation

For Rust

Install globally using Cargo:

cargo install person_registration

Or add it as a dependency to your project:

[dependencies]
person_registration = "*"

For Node.js

Install via npm or yarn:

npm install person-registration
yarn add person-registration

Usage

CLI

Physical Person (CPF)

Generate 5 CPF numbers:

person_registration --physical 5

Juridical Person (CNPJ)

Generate 5 CNPJ numbers:

person_registration --juridic 5

Mixed Mode

Generate a mix of CPF and CNPJ numbers:

person_registration --misc 5

Rust API

Add the Library

Include person_registration in your Rust project as shown in the installation section.

Example Usage

use person_registration::{Gen, Person, Juridic};

fn main() {
    let cpf = Person::generate();
    let cnpj = Juridic::generate();
    
    println!("Generated CPF: {}", cpf);
    println!("Generated CNPJ: {}", cnpj);
}

Node.js API

Import the Module

After installing via npm or yarn, import it into your project:

const { genPhysical, genJuridic } = require('person_registration');

// Generate a single CPF
console.log("Generated CPF:", genPhysical(10));

// Generate a single CNPJ
console.log("Generated CNPJ:", genJuridic(5));

Contributing

We welcome contributions from the community! If you'd like to improve this tool, feel free to:

  1. Fork the repository.
  2. Create a branch for your feature (feature/my-new-feature).
  3. Submit a pull request with a clear description of your changes.

License

This project is open-source and licensed under the MIT License.

Enjoy using Person Registration and feel free to suggest new features or report issues! 🚀


Links