bible-translation-lookup
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,7 +0,7 @@ | ||
const example = require('./js/example') | ||
const getTranslation = require('./js/get-translation') | ||
const main = () => { | ||
return example() | ||
const main = q => { | ||
return getTranslation(q) | ||
} | ||
module.exports = main |
{ | ||
"name": "bible-translation-lookup", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A simple bible translation lookup", | ||
@@ -8,6 +8,9 @@ "author": "danday74", | ||
"main": "index.js", | ||
"browser": "browser.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/istanbul cover -x \"**/*.spec.js\" ./node_modules/mocha/bin/_mocha -- js", | ||
"enforcer": "./node_modules/.bin/istanbul check-coverage --statement 100 --branch 100 --function 100 --line 100", | ||
"build": "npm-run-all test enforcer", | ||
"test": "istanbul cover -x \"**/*.spec.js\" ./node_modules/mocha/bin/_mocha -- js", | ||
"enforcer": "istanbul check-coverage --statement 100 --branch 100 --function 100 --line 100", | ||
"build": "npm run test && npm run enforcer", | ||
"browserify": "webpack --mode production && node browserify", | ||
"postcommit": "cross-env FORCE_COLOR=true npm run browserify", | ||
"prepush": "npm run build" | ||
@@ -20,3 +23,5 @@ }, | ||
"chai": "^4.1.2", | ||
"chalk": "^2.3.2", | ||
"coveralls": "2.11.16", | ||
"cross-env": "^5.1.4", | ||
"eslint": "^4.18.2", | ||
@@ -26,5 +31,17 @@ "husky": "^0.14.3", | ||
"mocha": "^5.0.4", | ||
"npm-run-all": "^4.1.2" | ||
"shelljs.exec": "^1.1.7", | ||
"sinon": "^4.4.2", | ||
"webpack": "^4.1.1", | ||
"webpack-cli": "^2.0.11" | ||
}, | ||
"keywords": [], | ||
"keywords": [ | ||
"bible", | ||
"translation", | ||
"version", | ||
"lookup", | ||
"find", | ||
"abbr", | ||
"abbreviation", | ||
"name" | ||
], | ||
"repository": { | ||
@@ -31,0 +48,0 @@ "type": "git", |
@@ -10,1 +10,93 @@ # bible-translation-lookup | ||
**A simple bible translation lookup** | ||
<br> | ||
## Introduction | ||
`bible-translation-lookup` gets a bible translation object from its name, abbreviation or alias | ||
It works both server side and client side | ||
<br> | ||
## Server side usage | ||
`npm install --save bible-translation-lookup` | ||
```javascript 1.7 | ||
const btl = require('bible-translation-lookup') | ||
const translation1 = btl('KJV') | ||
const translation2 = btl('New English Translation') | ||
console.log(translation1.name) // King James Version | ||
console.log(translation2.abbr) // NET | ||
``` | ||
<br> | ||
## Client side usage | ||
`npm install --save bible-translation-lookup` | ||
Add a script tag in head: | ||
```HTML | ||
<script src="node_modules/bible-translation-lookup"></script> | ||
``` | ||
Then use as follows: | ||
```HTML | ||
<script> | ||
const translation1 = bibleTranslationLookup('ASV') | ||
const translation2 = bibleTranslationLookup('New King James Version') | ||
console.log(translation1.name) // American Standard Version | ||
console.log(translation2.abbr) // NKJV | ||
</script> | ||
``` | ||
<br> | ||
## JSON structure | ||
JSON returned has the following structure: | ||
```json | ||
{ | ||
"abbr": "DARBY", | ||
"name": "Darby Translation", | ||
"aliases": ["Darby Bible", "Darby Bible Translation", "DBY"] | ||
} | ||
``` | ||
<br> | ||
## Supported translations | ||
We support the translations listed in [bible-translations.json](bible-translations.json "Jesus loves you") | ||
If you want support for another translation please raise an [issue](https://github.com/danday74/bible-translation-lookup/issues "Jesus loves you") | ||
<br> | ||
## Author says | ||
> but his delight is in the law of the Lord, and on his law he meditates day and night. | ||
> He is like a tree planted by streams of water that yields its fruit in its season, and its leaf does not wither. In all that he does, he prospers. | ||
[Psalm 1:2-3 ESV](https://www.bible.com/en-GB/bible/59/PSA.1.ESV "Jesus loves you") | ||
<br><br><br> |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
88418
21
290
102
12
1