osu-json

0.9.1 • Public • Published

osu-json

An ECMAScript 6 NPM module for parsing .OSU files into JSON.

Usage

// Require the module
const osujson = require('osu-json');

// Load the file to string however you like
const fs = require('fs');
let file = fs.readFileSync('./STYX_HELIX.osu', 'utf8');

// Then call 'ParseOSUFileAsync()'; it will return a promise for you to handle
osujson.ParseOSUFileAsync(file).then( (output)=>{
    console.log(JSON.stringify(output));
})
.catch( (err)=>{
    throw new Error(err);
});

Readme

Keywords

Package Sidebar

Install

npm i osu-json

Weekly Downloads

8

Version

0.9.1

License

MIT

Unpacked Size

17.3 kB

Total Files

3

Last publish

Collaborators

  • slynchy