Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    cinovo-isin-validatorpublic

    Build Status NPM version NPM dependencies

    cinovo-isin-validator

    Validate International Securities Identification Number (ISIN) . Checks:

    • if the format is correct
    • if the Country Code is correct
    • if the check digit is correct

    Getting started

    npm install cinovo-isin-validator
    

    sync style

    var validator = require("cinovo-isin-validator");
    if (validator("XX000A1G0AE8")) {
    	console.log("ISIN is invalid!");
    } else {
    	console.log("ISIN is fine!");
    }
    

    async style

    var validator = require("cinovo-isin-validator");
    validator("XX000A1G0AE8", function(err) {
    	if (err) {
    		console.log("ISIN is invalid!", err);
    	} else {
    		console.log("ISIN is fine!");
    	}
    });
    

    Options

    • checkCountryCode: Boolean - validate of Country Code (Default: true)

    • checkCheckDigit: Boolean - validate of Check Digit (Default: true)

      var validator = require("cinovo-isin-validator"); if (validator("XX000A1G0AE8"), undefined, {checkCountryCode: false, checkCheckDigit: false}) { console.log("ISIN is invalid!"); } else { console.log("ISIN is fine!"); }

      var validator = require("cinovo-isin-validator"); validator("XX000A1G0AE8", function(err) { if (err) { console.log("ISIN is invalid!", err); } else { console.log("ISIN is fine!"); } }, {checkCountryCode: false, checkCheckDigit: false});

    install

    npm i cinovo-isin-validator

    Downloadsweekly downloads

    1

    version

    0.2.0

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar