0.4.0 • Published 3 years ago

wiktionary-definition-parser v0.4.0

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

wiktionary-definition-parser

Parse a Wiktionary word's definitions

Install

npm install wiktionary-definition-parser

Usage

import parse from 'wiktionary-definition-parser';
 
const wikitext = '...';
const startIndex = ...; // The text between this index and the first line not beginning with a # will be parsed

const definitions = parse(wikitext, startIndex);

[
    'first defintion',
    'second definition',
    ...
]
0.4.0

3 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago