Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 823 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 823 Bytes

Validation des codes NIR - NIRPP - Numéro de sécurité sociale

Validation des numéros de sécurité sociale, basé sur la définition wikipedia

Parse and validate the french NIR, based on the wikipedia definition.

Install

$ npm install nir_validate

Usage

const validate = require('nir_validate');

validate('255081416802538');
// => true

validate('255081416802539');
// => false

validate('2 55 08 14 168 025 38');
// => true

Options

  • shouldClean - set this to false to become white-space and case sensitive
validate('2 55 08 14 168 025 38', {shoudlClean: false});
// => false