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

@znlbwo/wechat-emoji

v1.0.1

Published

[![Coverage Status](https://coveralls.io/repos/github/znlbwo/wechat-emoji/badge.svg)](https://coveralls.io/github/znlbwo/wechat-emoji)

Downloads

26

Readme

@znlbwo/wechat-emoji

Coverage Status

微信 emoji 表情插件,包含表情面板、文字转表情功能。

项目说明

用户故事

背景:我司自有一套类 云雀客服 的微信公众号管理系统,与公众号粉丝进行聊天互动。

  1. 我是一名微信公众号客服,我希望可以给粉丝发送带表情的消息,而不是干巴巴的文字,这样能够让粉丝觉得更亲切、更有温度。
  2. 我是一名微信公众号客服,粉丝发送过来的消息,表情无法正常显示。我希望能够显示出表情,这样能够让我更容易理解用户的语气。

需求分析

微信内的表情大多是微信团队自己设计的,非标准 Unicode emoji
在网络传输中,微信非标准 Unicode emoji 使用别名代替,比如 “[微笑]” 或 “/::)”,目前已知是这两种格式的别名。标准 Unicode emoji 因为本身就是 Unicode 字符,所以可以直接在网页中显示。

需求确认

  1. 表情面板
  2. 表情别名解析、转换

使用说明

安装依赖

yarn add @znlbwo/wechat-emoji

示例

Demo

API 说明

WechatEmojiPanel

微信 emoji 表情面板类

将生成的表情面板 Element 插入指定的 el 容器元素。

| 属性 | 类型 | 描述 | | -------- | -------- | ------------------------------------------------ | | el | Element | 表情面板容器元素 | | onSelect | Function | 点击选中表情的回调函数,参数:点击选中的表情别名 |

convertAlt2Emoji

将表情别名转换为 img element

传入表情别名,返回 img element

convertText2Emoji

将文本中的表情别名转换为 img element

传入一段文本,返回一段带 img element 的文本。