Socket
Socket
Sign inDemoInstall

node-dict

Package Overview
Dependencies
26
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-dict

Easy to translate in the terminal


Version published
Weekly downloads
172
increased by17100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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); '
}

Keywords

FAQs

Last updated on 23 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc