npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-dictionary

v0.2.2

Published

A tiny CLI tool for querying and translating by Node.js

Downloads

17

Readme

node-dictionary

Build Status node npm version npm

Installation

Prerequisity: Node.js (>=6.x)

$ npm install -g node-dictionary

Usage

Usage: dict <command> [options]

Commands:

  query|q <word>       query word by youdao dictionary
  trans|t <text>       translate text by baidu translator
  langs|l [from] [to]  toggle translator, default from [auto] to [zh]
  show|s [options]     show current or all translator
  help [cmd]           display help for [cmd]

Options:

  -h, --help     output usage information
  -V, --version  output the version number

Example

Query word

$ dict query apple

英 ['æp(ə)l]  美 ['æpl]

  n. 苹果,苹果树,苹果似的东西;[美俚]炸弹,手榴弹,(棒球的)球;[美俚]人,家伙。

网络释义

  APPLE  苹果,苹果,苹果公司
  Apple Lossless  Apple Lossless,Apple Lossless,애플 무손실
  Apple Store  苹果商店,苹果零售店,苹果商店

Powered by Youdao

Translate text

$ dict trans Apple is not an apple

English 英语           =>  Chinese 中文

Apple is not an apple  =>  苹果不是一个苹果

Powered by Baidu

Support

Query by Youdao

Only English-Chinese or Chinese-English querying support.

Translator by Baidu

Baidu translator support 27 kinds of languages.

Check languages table and choose two abbreviations via:

$ dict langs zh jp

Attention

  1. The target language cannot be auto.
  2. Cannot be same languages.
  3. In order to ensure the quality of the translation, please control the number of words.

Languages table

| Abbr | Language | 语言 | |------|---------------------|--------------| | auto | Auto | 自动检测 | | zh | Chinese | 中文 | | en | English | 英语 | | yue | Cantonese | 粤语 | | wyw | Classical Chinese | 文言文 | | jp | Japanese | 日语 | | kor | Korean | 韩语 | | fra | French | 法语 | | spa | Spanish | 西班牙语 | | th | Thai | 泰语 | | ara | Arabic | 阿拉伯语 | | ru | Russian | 俄语 | | pt | Potuguese | 葡萄牙语 | | de | German | 德语 | | it | Italian | 意大利语 | | el | Greek | 希腊语 | | nl | Ductch | 荷兰语 | | pl | Polish | 波兰语 | | bul | Bulgarian | 保加利亚语 | | est | Estonian | 爱沙尼亚语 | | dan | Danish | 丹麦语 | | fin | Finnish | 芬兰语 | | cs | Czech | 捷克语 | | rom | Romanian | 罗马尼亚语 | | slo | Slovenian | 斯洛文尼亚语 | | swe | Swedish | 瑞典语 | | hu | Hungarian | 匈牙利语 | | cht | Traditional Chinese | 繁体中文 |

License

MIT