issn
ISSN Validation
Last updated 4 years ago by richdouglas .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install issn 
SYNC missed versions from official npm registry.

International Standard Serial Number (ISSN) Validation

Build status Dependency Status devDependency Status Achievement Unlocked!

NPM

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.

Current Tags

  • 1.0.5                                ...           latest (4 years ago)

6 Versions

  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |