@midvash/bible-data
SDK TypeScript/JavaScript para leer versículos, capítulos y libros del dataset bible-data.
API tipada sobre el dataset bible-data, publicada en npm como @midvash/bible-data. Funciona en Node 18+ (usa fetch nativo), en navegadores y en runtimes de edge (Cloudflare Workers, Vercel Edge). Expone funciones como getVerse(slug, libro, capítulo, versículo), getChapter, getBook, getBible y getVersionMetadata, además de constantes como ALL_VERSION_SLUGS, VERSIONS_BY_LANGUAGE, KNOWN_LANGUAGES y BOOK_IDS. Acepta configuración personalizada con configure({ baseUrl, fetch }), útil para fijar una release específica del dataset o para inyectar un fetch con caché, reintentos o mocks. Los libros se identifican con códigos OSIS (Gen, Exod, …, Rev). Licencia MIT. Los textos servidos por la biblioteca siguen la licencia individual de cada versión (declarada en bible-data).
- getVerse / getChapter / getBook / getBible
- Constantes ALL_VERSION_SLUGS, VERSIONS_BY_LANGUAGE, BOOK_IDS
- Configurable: baseUrl personalizado, fetch personalizado
- Funciona en Node, navegador y runtimes de edge
- Tipos TypeScript completos
- Cero dependencias
npm install @midvash/bible-data
import { getVerse, getChapter, getBook } from '@midvash/bible-data';
// John 3:16 in the King James Version
const verse = await getVerse('kjv', 'John', 3, 16);
console.log(verse.text);
// "For God so loved the world, that he gave his only begotten Son..."
// All of John 3 in the World English Bible
const chapter = await getChapter('web', 'John', 3);
// The whole book of Genesis in Latin (Vulgate)
const genesis = await getBook('vulg', 'Gen');
¿Encontraste un error, faltan datos o quieres añadir algo? Los pull requests e issues son bienvenidos en github.com/midvash/bible-data-js .