New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-iso11649

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-iso11649

ISO 11649:2009 creditor reference library for node

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-iso11649

CircleCI Greenkeeper badge

ISO 11649:2009 RF creditor reference library for node

Installation

npm install node-iso11649 --save

Usage

Generating RF creditor reference

RF creditor reference can be generated from existing reference.

Existing reference characteristics:

  • Contain only numbers 0-9 and/or characters A-Z (example AB2G5 => RF68AB2G5).
  • Max length 21 characters.
  • Not case sensitive (example aB2g5 => RF68AB2G5).
  • Can be string with spaces (example '12345 12345' => RF451234512345).
  import {generate} from 'node-iso11649'

  console.log(generate('12345 12345'))
  // => RF451234512345

RF creditor reference can be generated also without existing reference. In that case epoch timestamp with finnish checksum at the end is used. Example of the result in the time of writing this.

  import {generate} from 'node-iso11649'

  console.log(generate())
  // => RF4714508655422864

Validating RF creditor reference

Valid RF creditor reference characteristics:

  • Must start with characters RF.
  • Must contain two checksum numbers in indexes 3 and 4.
  • Reference part must follow rules described in 'Existing reference characteristics' section.
  import {validate} from 'node-iso11649'

  console.log(validate('RF4714508655422864'))
  // => true
  import {validate} from 'node-iso11649'

  console.log(validate('RF00TEST'))
  // => false

Tests

npm run lint
npm test

Keywords

FAQs

Package last updated on 28 Mar 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc