New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

qqface

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qqface

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

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
26
85.71%
Maintainers
1
Weekly downloads
 
Created
Source

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/qqface@0.1.2/img/104.png'

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

名词解释:

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

API:

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

Keywords

qq

FAQs

Package last updated on 10 Feb 2023

Did you know?

Socket

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