https://github.com/danielgtaylor/bible-ref
Utilities for handling Bible references
https://github.com/danielgtaylor/bible-ref
Last synced: 10 days ago
JSON representation
Utilities for handling Bible references
- Host: GitHub
- URL: https://github.com/danielgtaylor/bible-ref
- Owner: danielgtaylor
- Created: 2013-09-25T13:03:28.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-25T13:03:51.000Z (almost 13 years ago)
- Last Synced: 2025-09-26T12:36:11.656Z (11 months ago)
- Language: CoffeeScript
- Size: 102 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Bible Reference Utilities
=========================
Utilities for handling Bible references, such as normalizing book names. This project started as a component of the [BibViz Project](http://github.com/danielgtaylor/bibviz), an interactive visualization of [Bible contradictions](http://bibviz.com/), violence, and misogyny in the Bible. It was spun off as it might be useful to others.
Usage
-----
Install the library via NPM:
```bash
npm install bible-ref
```
Then, once installed you can `require` and use it:
```javascript
var bref = require('bible-ref');
console.log(bref.bookNames);
console.log(bref.bookNormalize('1CO 1:1-4'));
```
Reference
---------
### bookNames
A list of book names in the Bible, e.g. `['Genesis', 'Exodus', ...]`.
### bookNormalize(ref)
Normalize the book name in a Bible reference.
```javascript
bref.bookNormalize('1CO')
>>> '1 Corinthians'
bref.bookNormalize('1CO 2:1')
>>> '1 Corinthians 2:1'
bref.bookNormalize('1 Corinthians 2:1')
>>> '1 Corinthians 2:1'
```
License
-------
This work is copyright 2013 Daniel G. Taylor and licensed under an MIT-style license.