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

simai-analyzer

v1.5.1

Published

A robust, tested and functional solution for parsing simai chart data

Readme

npm version Node.js CI GPLv3 License

Functional Simai file parser for Typescript - basically sus analyzer for simai

Installation

npm i simai-analyzer

Usage

Deserialize the entire maidata.txt:

import { deserializeMaidata } from "simai-analyzer/simai";

const file = `
&title=(the start of) Fragrance
&artist=Tsukasa(Arte Refact)
&wholebpm=180
&inote_5=(180.0){1},{8}3,2,1,,3,4,,6,{8}5,,7,8,,{57}2,,,,,,,E`;
const { errors, chart } = deserializeMaidata(file);
doStuffWith(chart.levels[difficulty.master].noteCollections)

Deserialize a single difficulty:

import { deserializeLevel } from "simai-analyzer/simai";

const data = `(180.0){1},{8}3,2,1,,3,4,,6,{8}5,,7,8,,{57}2,,,,,,,E`;
const { errors, chart: master } = deserializeSingle(data);
doStuffWith(master.noteCollections)

See the parse type UML diagram for more details on the deserialisation output.

Serialise a single difficulty:

import { serializeSingle } from "simai-analyzer/simai";

const { errors, text } = serializeSingle(chart, offset);

Serialise an entire maidata.txt:

import { serializeMaidata } from "simai-analyzer/simai";

const { errors, text } = serializeMaidata(file);

About

Introducing a reliable and correct simai deserializer for Javascript/Typescript. The parsing algorithm is resilient so even charts with errors can still be partially loaded, and there is a great deal of testing being done on core internal functions.

The emphasis is on correctness and code readability, not performance.

[!NOTE] Currently only serialization and deserializtion of charts are supported. I might add more complex analysis tools (simai-analyzer) at a later date. Stay tuned!

What Simai Analyzer currently is not

  • Fully AstroDX compatible (but should work in 99% of use-cases)
  • Fully MajData/3Simai compatible

Building and Setup

  1. Restore dependencies
npm install
  1. Generate the parser
npm run genparser
  1. Profit

At the moment, the easiest way to interact directly with the parser is through unit tests. Simply add a test under test/ and use

npm run test

to run the test suite, the existing tests should be straightforward enough to base your tests off of.

To play around with just the tokenizer, copy and paste the parser grammar into the online peggy.js parser generator. It is also possible to download the peggyjs vscode extension to test the grammar directly. Of course, unit tests are always the best way of doing tests.

Contributing

Feel free to raise issues or submit PRs in any format.