1.0.6 • Published 4 years ago

issn v1.0.6

Weekly downloads
104
License
Apache-2.0
Repository
github
Last release
4 years ago

International Standard Serial Number (ISSN) Validation

Build status Dependency Status devDependency Status Achievement Unlocked!

NPM Greenkeeper badge

npm install issn
var issn = require('issn');

Validate ISSNs.

issn('0355-4325'); // true
issn('0xDEDBEEF'); // false

Format ISSNs.

issn.format('0355-4325'); // '0355-4325'
issn.format('0001253x');  // '0001-253X'

issn.format('0xDEDBEEF'); // undefined

Calculate the check-digit.

issn.calculateCheckDigit('0355432'); // '5'
issn.calculateCheckDigit('0001253'); // 'X'

CLI

$ issn <ISSN>

Here's another example piping some canned output through jq.

$ echo {\"prism:pissn\": \"0000-0019\"} | jq -r '.["prism:pissn"]' | issn
true

If you find any problems with this module, tweet or open an issue.

1.0.6

4 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.1

9 years ago