node-dict
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

node-dict

Nodejs >= 16.0.0 required.

CLI Usage

Install

npm install node-dict -g

Usage

dict [word]

Example

$ dict hello

Output:

✔ [bing] hello
美[heˈləʊ],英[həˈləʊ],int. 你好;喂;您好;哈喽; 网络释义: 哈罗;哈啰;大家好;

Options

Usage: dict <word>

  -h, --help       Show help message
  --bing           Set Bing dictionary as default. (default)
  --youdao         Set Youdao dictionary as default
  -d, --default    Show default dictionary.
  -v, --version    Show version number

API Usage

Install

npm i node-dict

Usage

import { nodeDict } from 'node-dict'

const result = await nodeDict('hello')
console.log(result)

output:

{
  crawler: 'bing',
  source: 'test',
  result: '美[test],英[test],v. 试验;测试;检测;测验; n. 试验;检测;考试;测验; 网络释义: 检验;考验;睾酮(testosterone); '
}

Package Sidebar

Install

npm i node-dict

Weekly Downloads

153

Version

3.0.0

License

ISC

Unpacked Size

26.4 kB

Total Files

11

Last publish

Collaborators

  • satrong