en-etym

0.1.1 • Public • Published

en-etym

Build Status

A tool for searching etymology of English words on https://www.etymonline.com/

Installation

npm i en-etym

Usage

const etym = require('en-etym')

API

etym.getEtym

(word: String) => Promise

Fetch etymology information of a word in an asynchronized way. The resolved value of the Promise is the array of etymology information.

const etym = require('en-etym')
 
etym.getEtym('glitter').then(etymList => console.log(JSON.stringify(etymList)))
// [{"title":"glitter (v.)","etymDict":{"Old Norse":["glitra"],"Proto-Germanic":["*glit-"],"Old English":["glitenian"],"PIE":["*ghleid-","*ghel-"],"Greek":["khlidon"]}}]

etym.getEtymSync

(word: String, callback: (etymList: Array) => any) => void

Fetch etymology information of a word in a synchronized way. The argument of the callback function is the array of etymology information.

const etym = require('en-etym')
 
etym.getEtymSync('glitter', etymList => console.log(JSON.stringify(etymList)))
// [{"title":"glitter (v.)","etymDict":{"Old Norse":["glitra"],"Proto-Germanic":["*glit-"],"Old English":["glitenian"],"PIE":["*ghleid-","*ghel-"],"Greek":["khlidon"]}}]

/en-etym/

    Package Sidebar

    Install

    npm i en-etym

    Weekly Downloads

    0

    Version

    0.1.1

    License

    ISC

    Unpacked Size

    4.56 kB

    Total Files

    5

    Last publish

    Collaborators

    • kouchya