1.0.7 • Published 10 months ago

volume-string-parse v1.0.7

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
10 months ago

volume-string-parser

npm badge

Turn serials issue/volume strings like 'v.1 no.3 Aut 1979' into meaningful data that could be used for sorting or other nefarious deeds.

// node example
const parse = require('volume-string-parse')
const string = 'v.1 no.3 Aut 1979'
const data = parse(string)
console.log(data)
// data is
// { issue: '3',
//  original_string: 'v.1 no.3 Aut 1979',
//  volume: '1',
//  year: '1979' }

Ultimately, my goal is to have the module work in the browser.

notes

Doesn't parse season/month information right now (e.g. "Aut" in example above). That seems really hairy, plus not necessary in many cases (redundant with issue number), but may be added eventually.

Returns null if a data field isn't present in the original string or wasn't parsed.

license

GPL-3.0

1.0.7

10 months ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

4 years ago