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

tiaoom

v0.0.42

Published

<p align="center"> <img width="200" src="https://github.com/FishPiOffical/tiaoom/blob/master/logo.png?raw=true"> </p>

Readme

✨功能

  • 玩家注册与登录;
  • 多人在线房间管理;
  • 房间内玩家实时互动;
  • 可扩展的游戏逻辑接口;

🚀 快速开始

  • 安装包 tiaoom
npm install tiaoom

后端从 tiaoom 引入 Tiaoom,并继承实现通信方法:

import { Tiaoom } from 'tiaoom';

class YourGameServer extends Tiaoom {
  // 实现通信方法
}

具体见 game/backend/src/controller.ts

前端则从 tiaoom/client 引入 Tiaoom,并继承实现通信方法:

import { Tiaoom } from 'tiaoom/client';
class YourGameClient extends Tiaoom {
  // 实现通信方法
}

具体见 game/frontend/src/core/game.ts

🎮 实现游戏示例

本仓库内置一个基于 Websocket 为通信协议的游戏服务,实现新的游戏只需编写两个文件:

  • game/backend/src/games/yourgame.js - 游戏逻辑入口与配置信息;
  • game/frontend/src/components/yourgame/YourGameRoom.vue - 游戏前端组件;

完成后重启服务即可在前端选择运行游戏。

目前已内置:

⚙️ 调试/运行

  1. cd 到 game, 执行 npm install;
  2. 使用 Visual Studio Code 运行调试(直接按下F5即可),或执行 npm run dev:backend 启动后端开发服务器。
  3. 执行 npm run dev:frontend 启动前端开发服务器,访问 http://localhost:5173
  4. 首次访问会跳转到 /config 页面,配置好 MySQL (>=7.0) 数据库与持久化选项(可选)后保存,回到首页即可开始开发。

更多开发细节见 摸鱼派竞技大厅开发指南

📁 目录与文件

  • .vscode - VSCode 调试配置
  • lib - 核心类库
    • events - 各个数据事件定义
    • models - 数据模型实现
      • message.ts - 消息基础模型
      • player.ts - 玩家基础模型
      • room.ts - 房间基础模型
    • client - 前端类库入口
    • index.ts - 后端类库入口
  • game - 游戏示例
    • backend - 后端实现
      • src
        • controller.ts - 后端控制器实现
        • index.ts - 后端入口
        • games - 游戏逻辑实现
    • frontend - 前端实现
      • public - 静态资源
      • src
        • assets - 资源文件
        • components - 游戏组件文件
        • core - 前端核心类库实现
        • views - 视图文件
        • App.vue - 根组件
        • main.ts - 前端入口