# de-noun-parser

> Parse Wikitext's de-noun template

Latest version **2.2.1** (published 2021-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install de-noun-parser
pnpm add de-noun-parser
yarn add de-noun-parser
bun add de-noun-parser
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2021-03-08 |
| First published | 2019-02-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maroun Baydoun |
| Maintainers | maroun-baydoun |
| Keywords | wiktionary, parse, dictionary, german |

## Links

- npm: https://www.npmjs.com/package/de-noun-parser
- Repository: https://github.com/maroun-baydoun/de-noun-parser
- Homepage: https://dev.maroun-baydoun.com/de-noun-parser/
- Issues: https://github.com/maroun-baydoun/de-noun-parser/issues
- npm.io page: https://npm.io/package/de-noun-parser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.2.1 (latest) — 2021-03-08
- 2.2.0 — 2020-01-11
- 2.1.0 — 2020-01-04
- 2.0.0 — 2019-12-29
- 1.3.0 — 2019-12-14
- 1.2.0 — 2019-12-10
- 1.1.0 — 2019-02-15
- 1.0.0 — 2019-02-11

## README

## de-noun-parser
##### Parse Wikitext's de-noun template


[![npm version](https://badge.fury.io/js/de-noun-parser.svg)](https://badge.fury.io/js/de-noun-parser)

### Install

``` 
npm i de-noun-parser 
```
Or

``` 
yarn add de-noun-parser 
```

### Usage

``` ts

import parse from 'de-noun-parser';

const wikitext = '...';
const parsed = parse(wikitext);

```

### Parse result

| Field            | Type                                                                        | Note                                                                                                                      |
| ---------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **gender**       | `string`                                                                    | `m` or `f` or `n`                                                                                                         |
| **plural**       | `string`                                                                    | If `-en`, the plural form should default to the word + -en                                                                |
| **genetive**     | `string` \| `null`                                                          | If `-s`, the genetive form should default to the word + s. If `null`, the genetive form should default to the word itself |  |
| **diminutive**   | `string?`                                                                   | The diminutive form of the noun, or `undefined` when not applicable                                                       |
| **genderedForm** | `string?`                                                                   | The feminine form of a masculine noun, the masculine form of a feminine noun, or `undefined` when not applicable          |
| template         | `{ text: string, arguments: string, startIndex: number, endIndex: number }` | The template's full text, its arguments and its start and end indexes within the provided wikitext                        |

If the parsing is not successful, a subclass of `ParsingError` is thrown.

### Demo

Try the demo [here](https://dev.maroun-baydoun.com/de-noun-parser/#demo).

### About de-noun template

[Template:de-noun documentation](https://en.wiktionary.org/wiki/Template:de-noun)

---
_Source: https://npm.io/package/de-noun-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
