Catalog npm
Back to packageRELEASE DETAILS

1.0.1

npm

2109a-emoji

表情包处理方案

Published6 Jun 2024
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

1. 安装

npm install 2109a-emoji

2. 使用

// 引入对应的方法和数据
import {
  emojiList,
  addEmoji,
  emojiReplaceString,
  stringReplaceEmoji,
} from "2109a-emoji";

// emojiList 用于渲染表情列表
// 格式如下
[
  {
    emoji: "😄",
    rule: "[AA]",
  },
  {
    emoji: "😒",
    rule: "[B]",
  },
  {
    emoji: "😭",
    rule: "[C]",
  },
  {
    emoji: "😎",
    rule: "[D]",
  },
  {
    emoji: "🙂",
    rule: "[E]",
  },
];
// addEmoji 添加表情
// 语法: addEmoji(表情, 规则)
举例: addEmoji('😄','[AAA]')

// emojiReplaceString, 将表情包 转化 规则
// 举例子: “哈哈哈, 😄123”  => “哈哈哈, [A]123”
emojiReplaceString("哈哈哈, 😄123") // =>  “哈哈哈, [A]123”
// stringReplaceEmoji, 将规则 转化 表情包
// 举例子: “哈哈哈, [A]123”  => “哈哈哈, 😄123”
stringReplaceEmoji("哈哈哈, [A]123") // =>  “哈哈哈, 😄123”

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-ayAgenN+IV9IRKvHVsnKQ/Urg0M/CxOOs1DoRyvEU0+idokNj9sXbIJzdArY0eDO5Q2BPhdzD1uvZCbry1mcdw==",
  "shasum": "e161e1ec845e850e2691a396d908b4db112832c4",
  "tarball": "https://registry.npmjs.org/2109a-emoji/-/2109a-emoji-1.0.1.tgz",
  "fileCount": 3,
  "unpackedSize": 2287,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIDUzBYJTXRnKrXeaKsHJFVsSa0wTNDJS93synEDxVy+sAiEAjjEIc0DBlxK/xHTeW387vQABXNdRiJClQHqhVsB4TqQ="
    }
  ]
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:57 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:9334aba2f75ade9ba263fed6b00ab4a5552b37d01db6f44544c0978a7aed6006

Other collected versions

1.0.06 JunView all collected versions →