New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

validate-pt-id

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-pt-id

A simple utility to validate Portuguese IDs

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
2
-92.86%
Maintainers
1
Weekly downloads
 
Created
Source

Validate Portuguese Ids

npm version

Validate and generate CC (Citizen Identity Card) and NIF (Personal Tax Number) numbers.

Supports ESM and CommonJS (require/import).

Installation

$ yarn add validate-pt-id
$ npm install validate-pt-id
$ pnpm install validate-pt-id

Usage

import { generateNif } from 'validate-pt-id';

const nif = generateNif(); // 238043266
import { validateNif } from 'validate-pt-id';

const isValidNif = validateNif('238043266'); // true
import { generateCc } from 'validate-pt-id';

const cc = generateCc(); // 168893797ZY2
import { validateCc } from 'validate-pt-id';

const isValidCc = validateCc('168893797ZY2'); // true

Keywords

portuguese

FAQs

Package last updated on 20 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts