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 🙏

© 2026 – Pkg Stats / Ryan Hefner

message-room-moudes

v1.0.0

Published

message room basic module

Readme

Message board

Usage

import MessageRoom from '@befuture/messageRoom';

API

addMessage(message)

更新訊息。

Params

  • message {Object} - 要更新的訊息物件。
    • messageId {number} - 訊息的 ID。
    • date {string} - 訊息的日期和時間
    • status {string} - 訊息的狀態,依照服務器端回覆,'sending' | 'success',表示送出中及送出成功。
    • content {string} - *訊息。
    • images {string} - *圖片。
    • emoticon {string} - *表情。
    • user {Object} - 發送訊息的用戶資訊。
      • uid {string} - 用戶的唯一識別碼。
      • name {string} - 用戶的名稱。
      • avatar {string} - 用戶的頭像 URL。

Example

// content、images、emoticon 任意帶一個或是都帶皆可。
addMessage({
    content: '這是訊息',
    images: '圖片 URL',
    emoticon: '表情 URL'
});

messageList

Params

陣列中的每個物件 (*為非必要項)

  • messageId {number} - 訊息的 ID。
  • content {string} - *訊息的內容。
  • images {string} - *訊息的圖片。
  • emoticon {string} - *訊息的表情。
  • date {string} - 訊息的日期和時間,格式為 'yyyy-mm-dd hh:mm:ss'。
  • status {string} - 訊息的狀態,成功時為 'success'。
  • user {Object} - 發送訊息的用戶資訊,包含以下欄位:
    • uid {string} - 用戶的唯一識別碼。
    • name {string} - 用戶的名稱。
    • avatar {string} - 用戶的頭像 URL。

Eample

[
    {
        "messageId": 0,
        "content": "請選擇一隻寶可夢,開始你的冒險",
        "date": "2023-07-24 12:30:22",
        "status": "success",
        "user": {
            "uid": "user01",
            "name": "大木博士",
            "avatar": "https://obs.line-scdn.net/0hVi1M8ln3CUYMNCRXjPV2ETZiCik_WBpFaAJYRU9aV3JyAkkZZVpBKC8yU38gAU4YYgVPIikzEncoV01DNVtB/w644"
        }
    },
    {
        "messageId": 4,
        "content": "...",
        "date": "2023-07-24 12:31:28",
        "status": "sending",
        "user": {
            "uid": "user00",
            "name": "小智",
            "avatar": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRikBy1_eTkPOQ74g8KLwvAgl6vW2nb5pDHuvaG3yrVfpM1_8Qb-EbcER2v9OoIXHoyhSA&usqp=CAU"
        }
    }
]