3.0.0 • Published 6 years ago
ordbok v3.0.0
ordbok
Node.js module/CLI app for querying ordbok.uib.no
Installation
$ npm install ordbokYou can also install it globally to use the CLI version.
$ npm install ordbok -gTest
Make sure you have installed Mocha globally or go to the ordbok folder and do an nmp install.
$ npm testUsage
Pass an object with the required property and receive the result.
word String you want to lookup.
const ordbok = require('ordbok')
const options = {
word: 'syltelabb'
}
ordbok(options, (error, data) => {
if (error) throw error
console.log(data)
})CLI
To use it as a CLI app install it globally.
To display help
$ ordbok --helpTo display version
$ ordbok --versionUsage
$ ordbok <query>Output
{"bokmal":
[
{
"word": String ,
"partOfSpeech": String ,
"paradigm": [
String
],
"wordsOrigin": String ,
"interpretation": [
{
"definition": String
}
]
}
]
, "nynorsk":
[
{
"word": String ,
"partOfSpeech": String ,
"paradigm": [
String
],
"wordsOrigin": String ,
"interpretation": [
{
"definition": String
}
]
}
]
}