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

@ionjs/core

v0.6.5

Published

Yet another QQ bot framework based on CQHTTP & CoolQ.

Downloads

876

Readme

Ion.js

GitHub Docs Build status codecov CodeFactor Language grade: JavaScript npm (scoped) install size

Yet another QQ bot framework based on CQHTTP & CoolQ.

介绍

Ion.js 是一个用 TypeScript 写就,在 Node.js 环境下运行,基于 CQHTTP酷Q 的 QQ 机器人框架。

Ion.js 提供两类消息处理器:中间件和会话。接收到的消息将经过中间件依次处理,并最终分发给会话。得益于 JavaScript 的异步 I/O 与对消息流的封装,开发者可以便捷地创建与用户持续交互的会话;同时,Ion.js 提供了一系列实用工具(甚至一个用以声明命令的 DSL),以更加方便地描述、书写消息处理器。

Ion.js 使用 koa 来与 CQHTTP 通信,同时使用了 Node.js 原生的 stream.PassThrough 简单流来构造持续的消息流。

需要注意的是,Ion.js 仍使用的是传统的 HTTP 通信方式,且不内置对会话状态的长期存储(即仅有内存存储);Ion.js 要求 Node.js 环境支持 ES2017,CQHTTP 插件在版本 4 以上。

特性

  • 是可引入的 CommonJS 模块,因此无需遵循特定的路径结构;
  • 有一系列实用工具,包括获取消息时的条件判断与CQ码的处理等;
  • 支持真正的中间件,数据传至下游、控制传回上游;
  • 提供更强大的命令声明与解析,包括具名参数、引号转义、默认值等;
  • 支持创建与用户持续交互的会话,使用友好的异步 I/O。

文档

贡献

  • 如果本项目对你有帮助,请点一颗 Star。
  • 如遇到任何问题,且确定问题来源不是你的代码,请第一时间提出 issue 以便 Ion.js 修复。
  • 欢迎 Pull Requests。