Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

node-id-number-validator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-id-number-validator

JavaScript ID Number Validator for NodeJS

Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

ID Number Validator for Node

Introduction

This is a collection of validators of identity document number for JavaScript applications.

Usage

Step 1, install.

npm i node-id-number-validator

Step 2, get a validator.

const IDValidators = require('node-id-number-validator');
const validator = IDValidators.getValidator('SG', 'NRIC');

Step 3, validate an input.

const result = validator('S0980292D');

And the result is in format:

{
    'result': true or false,
    'reason': string if the result is false
}

Available Validators

CountryDocument
SG (Singapore)NRIC

FAQs

Package last updated on 07 Oct 2016

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