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

stt-serde-mjs

v0.0.4

Published

STT serializer and deserializer for Douyu danmaku

Downloads

6

Readme

STT 序列化反序列化库

这是一个斗鱼STT序列化反序列化库。 STT是斗鱼自创的序列化反序列化算法, 并用于传输斗鱼弹幕, STT序列化规定如下:

1. 键key和值value直接采用`@=`分割
2. 数组采用`/`分割
3. 如果key或者value中含有字符`/`, 则使用`@S`转义
4. 如果key或者value中含有字符`@`, 则使用`@A`转义

Getting Started

Prerequisites

1. NodeJS version >= 8.5.0
2. 使用该库的application在运行时必须添加选项 `--experimental-modules`

Installing

使用npm安装

npm install stt-serde-mjs

Usage

import { deserialize } from 'stt-serde-mjs';

const message = 'type@=chatmsg/rid@=312212/ct@=1/uid@=39273792/nn@=Tomorrow66啊/txt@=举报了/cid@=ac4e300f33b9482e06f2000000000000/ic@=avatar@Sdefault@S13/level@=4/sahf@=0/cst@=1552963180037/bnn@=/bl@=0/brid@=0/hc@=/el@=/lk@=/'
const record = deserialize(message);

STT serializer and deserializer

This is a STT serialize and deserialize library. It serialze a JSON into string or deserialize a string into JSON. STT is used by Douyu to serialize and deserialize danmaku. STT's rule:

1. Key and value are separeted by `@=`
2. Items in an array are separeted by `/`
3. `/` in keys or values should be escaped as `@S`
4. `@` in keys or values should be escaped as `@A`

Getting Started

Prerequisites

1. NodeJS version >= 8.5.0
2. Application using this module MUST run with option `--experimental-modules`

Installing

Use the package manager npm to install

npm install stt-serde-mjs

Usage

import { deserialize } from 'stt-serde-mjs';

const message = 'type@=chatmsg/rid@=312212/ct@=1/uid@=39273792/nn@=Tomorrow66啊/txt@=举报了/cid@=ac4e300f33b9482e06f2000000000000/ic@=avatar@Sdefault@S13/level@=4/sahf@=0/cst@=1552963180037/bnn@=/bl@=0/brid@=0/hc@=/el@=/lk@=/'
const record = deserialize(message);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

ISC