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

qqface

v0.2.0

Published

经典QQ表情/文字替换 + png/gif图片

Downloads

47

Readme

qqface

经典QQ表情/文字替换 已应用于qqlog 版本0.1.x新增了png/gif图片目录

注意最新版本0.2.x 移除了部分api 移除了本地图片文件 改为使用cdn网络图片 如果你想要查看0.1.x版本 或是需要QQ表情本地文件 请查看0.1.x

这是一个底层依赖 如果你想要的是 完整的文本解析/替换函数 请查看qtext-parse

npm install --save qqface
var qqface = require('qqface')

qqface.textFromIndex(0)
qqface.textFromIndex(0, 'zh')
//=> '微笑'

qqface.textFromIndex(0, 'en')
//=> 'Smile'

// lang参数可选 有fallback
qqface.indexFromText('委屈')
qqface.indexFromText('委屈', 'en')
qqface.indexFromText('委屈', 'zh')
qqface.indexFromText('Shrunken')
qqface.indexFromText('Shrunken', 'en')
qqface.indexFromText('Shrunken', 'zh')
//=> 49
// 默认png 注意 仅支持 0.png ~ 104.png
qqface.imgFromIndex(104, 'png')
qqface.imgFromIndex(104)
//=> 'https://unpkg.com/[email protected]/img/104.png'

// gif兜底 支持 0.gif ~ 121.gif
qqface.imgFromIndex(121, 'gif')
qqface.imgFromIndex(121, 'png')
qqface.imgFromIndex(121)
//=> 'https://unpkg.com/[email protected]/img/121.gif'

名词解释:

  • text为表情对应的文字信息
  • index为(webqq)表情选择栏上的显示序号

API:

  • textMaps = [["微笑",..], ["Smile",..]]
  • textFromIndex(index, [lang])
  • indexFromText(text, [lang])
  • imgFromIndex(index, [type])