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

node-osr

v1.2.1

Published

NodeJS library for serialization and deserialization of osu replay files

Downloads

218

Readme

node-osr

NodeJS library for reading and writing osu replay files


Features

  • Load .osr replays
  • Create new Replays
  • Write them in .osr
  • Synchronous and asynchronous
  • Promise asynchronous functions

Install

Download it from npm.

$ npm install node-osr --save

Documentation

Check out the examples

Require node-osr let osr = require('node-osr')

osr.read([string | Buffer])

Promise version of osr.read().

osr.read([string | Buffer], (err, replay))

Asynchronious version of osr.readSync().

osr.readSync([string | Buffer])

Returns a Replay class with the input's data.

new osr.Replay()

Creates a new blank Replay class.

Replay {
  gameMode: 0,
  gameVersion: 0,
  beatmapMD5: '',
  playerName: '',
  replayMD5: '',
  number_300s: 0,
  number_100s: 0,
  number_50s: 0,
  gekis: 0,
  katus: 0,
  misses: 0,
  score: 0,
  max_combo: 0,
  perfect_combo: 0,
  mods: 0,
  life_bar: '',
  timestamp: 0,
  replay_length: 0,
  replay_data: '',
  unknown: 0
}

replay.serialize()

Promise version of replay.serialize().

replay.write(path(err, Buffer))

Asynchronous version of replay.writeSync()

replay.writeSync(path)

Writes replay into a file specified by path

replay.serialize((err, Buffer))

Asynchronous version of replay.serializeSync().

replay.serializeSync()

Returns the Buffer of the replay.

Related libraries

osureplayparser - Clearly formatted replay reading based on this library

License

MIT