https://github.com/phillipb/bible-verse-parser
Lightweight library for parsing bible references in a string
https://github.com/phillipb/bible-verse-parser
bible religious
Last synced: about 1 month ago
JSON representation
Lightweight library for parsing bible references in a string
- Host: GitHub
- URL: https://github.com/phillipb/bible-verse-parser
- Owner: phillipb
- Created: 2019-10-26T03:10:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T01:37:51.000Z (almost 2 years ago)
- Last Synced: 2025-04-08T16:06:12.364Z (about 1 month ago)
- Topics: bible, religious
- Language: TypeScript
- Homepage:
- Size: 790 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bible Verse Parser
Parses out verse references in a block of text.
```ts
import {parseText} from 'bible-verse-parser';parseText('I love Romans 10:9')
// [{"startIdx":7, "endIdx":18, "osis":"Rom.10.9", "text":"Romans 10:9"}]
```It supports ranges
```ts
import {parseText} from 'bible-verse-parser';parseText('I love Romans 10:9-10')
// [{"startIdx":7,"endIdx":21,"osis":"Rom.10.9-Rom.10.10","text":"Romans 10:9-10"}]
```It supports comma spanish
```ts
import {parseText} from 'bible-verse-parser';parseText('I love Romanos 10:9-10')
// [{"startIdx":7,"endIdx":22,"osis":"Rom.10.9-Rom.10.10","text":"Romanos 10:9-10"}]
```#### Todo
1. Add ability to customizing the list of valid book names.
1. Add better localization support