fast-lei
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

npm version Build Status GitHub license

LEI

Validation and control key generation for Legal Entity Identifier (LEI).

Usage

In node.js

var LEI = require('fast-lei');
 
LEI.isValid('969500T3MBS4SQAMHJ45'); // false
LEI.isValid('724500VKKSH9QOLTFR81'); // true
 
LEI.generate('969500KSV493XWY0PS'); // 969500KSV493XWY0PS33

API

isValid(value) -> Boolean

Check requirements.
Returns if the LEI check digits are valid.

Required

  • Value must be not Null
  • Value must be of type String
  • Value must respect format ^[0-9A-Z]{20}$

generate(value) -> String

Check requirements.
Returns the LEI check digit appended to the value.

Required

  • Value must be not Null
  • Value must be of type String
  • Value must respect format ^[0-9A-Z]{18}$

Package Sidebar

Install

npm i fast-lei

Weekly Downloads

133

Version

1.2.1

License

MIT

Unpacked Size

6.07 kB

Total Files

5

Last publish

Collaborators

  • edumdum