New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

isbn-groups

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isbn-groups

mapping ISBN group prefixes with ISO 639-1 language codes (2 letters code)

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
94
18.99%
Maintainers
1
Weekly downloads
 
Created
Source

isbn-groups

mapping ISBN group prefixes with ISO 639-1 language codes (2 letters code), when that's possible, that is a strong assumption that a book published in that country would be in that language

Installation

$ npm install isbn-groups

Usage

Example using isbn-groups and isbn3 for ISBN parsing

const { parse } = require('isbn3')
const isbnGroups = require('isbn-groups')
  • example 1
const isbn = '9782707301529'
const { prefix, group } = parse(isbn)
// prefix: '978'
// group: '2'

isbnGroups[prefix][group]
// => 'fr'
  • example 2
const isbn = '9789953211206'
const { prefix, group } = parse(isbn)
// prefix: '978'
// group: '9953'

isbnGroups[prefix][group]
// => 'ar'

See Also

  • isbn3: ISBN parsing, validation, and formatting utilities
  • wikidata-lang: mappings between 2-letters language codes (ISO 639-1) and Wikidata ids

Keywords

ISBN

FAQs

Package last updated on 27 Mar 2020

Related posts