find-artikel
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "find-artikel", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "A library and CLI tool which finds artikels of German words.", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"dev": "nodemon ./src/lib/index.js", | ||
"start": "node ./src/lib/index.js" | ||
"dev": "nodemon src/lib/index.js", | ||
"start": "node src/lib/index.js" | ||
}, | ||
@@ -10,0 +10,0 @@ "keywords": [ |
# Find Artikel | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![npm package](https://img.shields.io/npm/v/find-artikel.svg)](https://www.npmjs.org/package/find-artikel) [![downloads](https://img.shields.io/npm/dt/find-artikel.svg)](https://www.npmjs.com/package/find-artikel) [![size](https://img.shields.io/bundlephobia/minzip/find-artikel)](https://www.npmjs.com/package/find-artikel) | ||
> A library and CLI tool which uses [Yandex Dictionary API](https://yandex.com/dev/dictionary/) to find the **artikels** of German words. | ||
<img src="static/logo.png" width="200" height="200"> | ||
## CLI | ||
```bash | ||
npm i -g find-artikel | ||
find-artikel apfel # "der" | ||
``` | ||
## Library | ||
```javascript | ||
const { findArtikel } = require('find-artikel') | ||
findArtikel('schlange').then((res) => { | ||
console.log(res) // "die" | ||
}) | ||
``` | ||
## Contributing | ||
@@ -15,3 +37,6 @@ | ||
- | ||
- Improve Documentation | ||
- Add Unit Tests | ||
- Add ESLint | ||
- Migrate to TypeScript | ||
@@ -24,2 +49,2 @@ ## Contributors | ||
MIT | ||
[MIT](https://opensource.org/licenses/MIT) |
const convertGenderToArtikel = async (letter) => { | ||
switch (letter) { | ||
case 'm': | ||
return 'Der' | ||
return 'der' | ||
case 'n': | ||
return 'Das' | ||
return 'das' | ||
case 'f': | ||
return 'Die' | ||
return 'die' | ||
case 'p': | ||
return 'Die' | ||
return 'die' | ||
default: | ||
@@ -12,0 +12,0 @@ return undefined |
@@ -1,2 +0,3 @@ | ||
require('dotenv').config() | ||
const path = require('path') | ||
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') }) | ||
@@ -9,5 +10,6 @@ const axios = require('axios') | ||
try { | ||
RES = await axios( | ||
const fullURL = | ||
BASE_URI + '/lookup?key=' + API_KEY + '&lang=de-en&text=' + word | ||
) | ||
RES = await axios(fullURL) | ||
} catch (error) { | ||
@@ -14,0 +16,0 @@ throw new Error(error) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4820
12
93
49