Nonviolent Pigeon Manifestation

npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

creditor-id

1.0.0 • Public • Published

Creditor Identifier

npm npm license npm downloads build status

Install via npm

$ npm install creditor-id

Usage

var CreditorId = require( 'creditor-id' )

Parsing CIDs

var cid = new CreditorId( 'DE98ZZZ09999999999' ) // OR
var cid = CreditorId.parse( 'DE98ZZZ09999999999' )
CreditorId {
  countryCode: 'DE',
  checksum: '98',
  businessCode: 'ZZZ',
  nationalId: '09999999999'
}

Calculating and validating checksums

var checksum = cid.getChecksum() // > '98'
if( cid.check() ) {
  // The CID's checksum is valid
}

Formatting a CID

cid.toString() // > 'DE98ZZZ09999999999'

install

npm i creditor-id

Downloadsweekly downloads

62

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability