npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mg-bibles

v1.5.0

Published

A package for accessing Bible verses in Malagasy (MG), Diem, King James (KJV), and Louis Segond (APEE) versions

Readme

mg-bibles

A package for accessing Bible verses in Malagasy (MG), Diem, King James (KJV), and Louis Segond (APEE) versions. This package is actively maintained as it's a core dependency of Stage, the ultimate app for performers, musicians, and artists.

Installation

npm install mg-bibles

Usage

import { getVerses, listBooks, countVerses, chapterCount, versesCount } from 'mg-bibles';

// Get specific verses from MG version
const verses = getVerses('mg', 'jaona 3:16');
console.log(verses);
// Output: { reference: 'jaona 3:16', verses: { '16': '16. For God so loved the world...' } }

// Get verses from KJV version using full book name
const kjvVerses = getVerses('kjv', 'genesis 1:1');
console.log(kjvVerses);
// Output: { reference: 'genesis 1:1', verses: { '1': '1. In the beginning God created...' } }

// Get verses from APEE version using full book name
const apeVerses = getVerses('apee', 'genesis 1:1');
console.log(apeVerses);
// Output: { reference: 'genesis 1:1', verses: { '1': '1. Dieu, au commencement...' } }

// Get a range of verses
const range = getVerses('diem', 'jaona 3:16-18');
console.log(range);
// Output: { reference: 'jaona 3:16-18', verses: { '16': '16. For God so loved...', '17': '17. For God did not...', '18': '18. Whoever believes...' } }

// Get multiple specific verses
const multiple = getVerses('mg', 'jaona 3:16,18');
console.log(multiple);
// Output: { reference: 'jaona 3:16,18', verses: { '16': '16. For God so loved...', '18': '18. Whoever believes...' } }

// Get a whole chapter
const chapter = getVerses('diem', 'jaona 3');
console.log(chapter);
// Output: { reference: 'jaona 3', verses: { '1': '1. Now there was...', '2': '2. This man came...', ... } }

// List all books in a version
const books = listBooks('mg');
console.log(books);
// Output: ['amosa', 'apokalypsy', 'asa', 'daniela', ...]

// Count total verses in a book
const totalVerses = countVerses('mg', 'jaona');
console.log(totalVerses);
// Output: 879

// Get number of chapters in a book
const chapters = chapterCount('mg', 'jaona');
console.log(chapters);
// Output: 21

// Count verses in a specific chapter
const versesInChapter = versesCount('mg', 'jaona', 3);
console.log(versesInChapter);
// Output: 36

API

getVerses(version: BibleVersion, reference: string)

Returns verses from the specified Bible version based on the reference string.

Parameters

  • version: The Bible version to use ('mg', 'diem', 'kjv', or 'apee')
  • reference: A string in the format "book chapter:verse" or "book chapter:verse-verse" or "book chapter:verse,verse"

Returns

An object containing:

  • reference: The original reference string
  • verses: An object mapping verse numbers to their text

Supported Reference Formats

  • Single verse: "jaona 3:16" (MG/DIEM) or "genesis 1:1" (KJV/APEE)
  • Verse range: "jaona 3:16-18" or "genesis 1:1-2"
  • Multiple verses: "jaona 3:16,18" or "genesis 1:1,3"
  • Whole chapter: "jaona 3" or "genesis 1"

Note: For KJV and APEE versions, write full book names in english.

listBooks(version: BibleVersion)

Returns an array of all book names available in the specified Bible version.

Parameters

  • version: The Bible version to use ('mg' or 'diem')

Returns

An array of strings containing book names, sorted alphabetically with proper handling of numbered books.

countVerses(version: BibleVersion, bookName: string)

Returns the total number of verses in a specific book.

Parameters

  • version: The Bible version to use ('mg' or 'diem')
  • bookName: The name of the book to count verses from (case-insensitive)

Returns

A number representing the total count of verses in the specified book.

Example:

countVerses('mg', 'jaona') // returns 879
countVerses('mg', 'salamo') // returns 2461

chapterCount(version: BibleVersion, bookName: string)

Returns the number of chapters in a specific book.

Parameters

  • version: The Bible version to use ('mg' or 'diem')
  • bookName: The name of the book to count chapters from (case-insensitive)

Returns

A number representing the total count of chapters in the specified book.

Example:

chapterCount('mg', 'jaona') // returns 21
chapterCount('mg', 'salamo') // returns 150

versesCount(version: BibleVersion, bookName: string, chapter: number)

Returns the number of verses in a specific chapter of a book.

Parameters

  • version: The Bible version to use ('mg' or 'diem')
  • bookName: The name of the book (case-insensitive)
  • chapter: The chapter number

Returns

A number representing the count of verses in the specified chapter.

Example:

versesCount('mg', 'jaona', 3) // returns 36
versesCount('mg', 'salamo', 119) // returns 176

Types

type BibleVersion = 'mg' | 'diem' | 'kjv' | 'apee';

type VerseReference = {
  book: string;
  chapter: number;
  verses?: number[];
};

License

MIT

Used By

This package is a core dependency of Stage, the ultimate app for performers, musicians, and artists. Stage uses mg-bibles to provide clear lyrics display and easy access to biblical content for church musicians and performers.