JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q51648F
  • License MIT

Obtain the universal abbreviation or title of a Bible book in different languages.

Package Exports

  • bible-abbreviation
  • bible-abbreviation/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bible-abbreviation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

bible-abbreviation

npm version

Easily obtain the universal identifiers and full names of the books of the Bible in a variety of formats and languages.

Table of Contents

⚙️ Installation

Use npm to install :

npm install bible-abbreviation

📑 Usage

Import the desired functions into your files :

const { bookTag, bookTitle } = require('bible-abbreviation');

📝 Functions

The module provides two functions for the moment, see the documentation for each below.

bookTag

Returns a universal abbreviation for the requested book if it exists, return null if not. Supported abbreviations can be found in the canonAbbrv.json file.

Example :

const abbreviation = bookTag('Genesis');
console.log(abbreviation); // Output: "GN"
Parameter Type Required ? Description
abbrv string yes The book you want to get the code. Must be contain in canonAbbrv.json file.

💡 Forgot an abbreviation? Add it and submit a pull-request on github or open an issue.

bookTitle

Returns a title for the requested book if it exists, in one of the following three formats:

  • long - Detailed title (e.g. Mt → Évangile selon saint Matthieu)
  • short - Abbreviated book title (e.g. 2 Th → 2 Thessaloniciens)
  • tiny - Standard abbreviation (eg: Genèse → Gn)

Examples :

const defaultTitle = bookTitle('Gn');
const longTitle = bookTitle('Gn', 'long');
const tinyTitle = bookTitle('Genesis', 'tiny');
console.log(defaultTitle); // Output: "Génèse"
console.log(longTitle); // Output: "Livre de la Genèse"
console.log(tinyTitle); // Output: "Gn"
Parameter Type Required ? Description
book string yes The book you want to get the title.
size string no The format of the title. See availables one above. Default size is short.

⚠️ Only French is supported for the moment, other languages are coming soon.

📋 Todos

  • Add English language support.
  • Extend supported canon to Orthodox deuterocanonical books

📜 License

Copyright © 2023 RyanHmd This project is MIT licensed.