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 🙏

© 2025 – Pkg Stats / Ryan Hefner

simai-analyzer

v1.0.16

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

[!WARNING] This project is still relatively new and is not fully done yet. Deserialisation should work fine, but serialisation is still not implemented.

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.

About

Introducing a reliable and correct simai deserializer for Javascript/Typescript.

What's so good about this one?

This parser has a few good things going for it which should make the lives of developers and players easier.

  • A fault tolerant system. Malformed charts still partially come through without just giving up and throwing errors.
  • Entirely functional, typed and well-tested code
  • Robust and clearly defined syntax parsing with Peggy.js
  • A stronger emphasis on correctness over performance
  • Sane API structure
  • Active support

What Simai Analyzer currently is not

  • Fully AstroDX compatible (but should work in 99% of use-cases)
  • Fully MajData/3Simai compatible
  • An absolute definitive on what simai semantics should be (but it will make clear any some assumptions where there may be ambiguities)

Building and Setup

Simai analyzer is really small and easy to set up locally.

Restore dependencies

npm install

Generate the parser

npm run genparser

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.

If you're going to raise an issue, describe the bug in as much detail as you can.

Try to follow the Conventional Commits style of writing commit messages.

Write code that is functional, makes ample use of the type system and includes tests. Those are all the whole point of this project.