wiktionary-definition-parser
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

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',
    ...
]

Package Sidebar

Install

npm i wiktionary-definition-parser

Weekly Downloads

2

Version

0.4.0

License

MIT

Unpacked Size

5.09 kB

Total Files

5

Last publish

Collaborators

  • maroun-baydoun