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

@vearvip/hanzi-radical-stroke-counts

v1.0.4

Published

查询汉字的部首和笔画,数据爬取自汉典网

Downloads

4

Readme

hanzi-radical-stroke-counts

简介

本npm包提供了一个简单而直接的函数,用于查询汉字的部首及笔画信息。数据爬取自汉典(ZDIC),确保了信息的准确性和可靠性。通过本包,您可以轻松地集成汉字部首查询功能到您的应用中,特别适用于教育软件、文字处理工具或任何需要深入处理汉字信息的项目。

安装

使用npm安装此包:

npm install @vearvip/hanzi-radical-stroke-counts

或使用yarn安装:

yarn add @vearvip/hanzi-radical-stroke-counts

使用方法

导入queryRadicalStrokeCount函数,并传入您想查询的汉字作为参数,函数将返回一个数组,其中包含汉字的部首和总笔画数。

import { queryRadicalStrokeCount } from '@vearvip/hanzi-radical-stroke-counts';

const hanzi = '额';
const result = queryRadicalStrokeCount(hanzi);
console.log(result); // 输出:[ "页", 15 ]

// 解释:汉字"额"的部首是"页",总笔画数为15。

特性

  • 精准查询:直接根据汉字获取其部首及笔画数。
  • 数据可靠:数据源自汉典(ZDIC),保证信息权威性。
  • 易于集成:单一函数接口,快速融入现有项目。

注意事项

  • 本包采用esm,请确保运行环境支持es module。
  • 本包仅支持查询汉字的部首及总笔画数,不包含其他诸如读音、释义等信息。
  • 请确保查询的汉字存在于数据源中,未收录的罕见或特殊汉字可能无法返回结果。
  • 如需查询汉字读音信息,请使用@vearvip/hanzi-readings这个npm包。

贡献

如有任何问题或建议,请在GitHub上提交issue,我们会尽快响应。希望本包能为您的项目带来便利!

许可证

此项目遵循MIT许可证发布。更多详情请查看LICENSE文件。