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

pa-meta

v2.0.0

Published

Creates and modifies Project Arrhythmia metadata.lsb files.

Downloads

3

Readme

Creates and modifies Project Arrhythmia metadata.lsb files.

🏠 Homepage

Install

npm install pa-meta

Usage

import { Metadata, Artist, ... } from "pa-meta";
const { Metadata, Artist, ... } = require("pa-meta");

Creating

Creating Metadata

With default values:

const metadata = new Metadata();

With specified values:

const metadata = new Metadata({
  artist: new Artist({
    /* ... */
  }),
  /* ... */
});

Creating Artist

With default values:

const artist = new Artist();

With specified values:

const artist = new Artist({
  name: "Artist name",
  link: "artistLink",
  linkType: LinkType.SoundCloud,
});

Creating Creator

With default values:

const creator = new Creator();

With specified values:

const creator = new Creator({
  steamName: "Name",
  steamId: 471736531,
});

Creating Song

With default values:

const song = new Song();

With specified values:

const song = new Song({
  title: "Song title",
  difficulty: Difficulty.Easy,
  description: "Song description",
  bpm: 120,
  /* ... */
});

Creating Beatmap

With default values:

const beatmap = new Beatmap();

With specified values:

const beatmap = new Beatmap({
  dateEdited: new Date() /* OR */ Date.now();
  gameVersion: "20.4.4",
  workshopID: -1,
  /* ... */
});

Working

NOTE: toJson() and toString() return serialized values that PA accepts (e.g. steam_name instead of steamName).

Working with Metadata

Setting values:

metadata.artist = new Artist({ ... });

Getting values:

  • As class instances
metadata.artist; // [Artist]
  • As JSON objects
metadata.artist.toJson(); // { name: "Artist name", ... }
  • As JSON strings
metadata.artist.toString(); // "{ name: "Artist name", ... }"

Working with Artist

Setting values:

artist.name = "Artist name";
artist.link = "artistLink";
artist.linkType = LinkType.SoundCloud;

Getting:

  • Normal values
artist.name; // "Artist name"
artist.link; // "artistLink"
artist.linkType; // 1
  • JSON object
artist.toJson(); // { name: "Artist name", ... }
  • JSON string
artist.toString(); // "{ name: "Artist name", ... }"

Working with Creator

Setting values:

creator.steamName = "Name";
creator.steamId = 0;

Getting:

  • Normal values
creator.steamName; // "Name"
creator.steamId; // 0
  • JSON object
creator.toJson(); // { steam_name: "Name", ... }
  • JSON string
creator.toString(); // "{ steam_name: "Name", ... }"

Working with Song

Setting values:

song.title = "Song title";
song.difficulty = Difficulty.Easy;
song.bpm = 120;

Getting:

  • Normal values
song.title; // "Song title"
song.difficulty; // 0
song.description; // "Song description"
song.bpm; // 120
song.previewStart; // 140
song.previewLength; // 60
  • JSON object
song.toJson(); // { title: "Song title", ... }
  • JSON string
song.toString(); // "{ title: "Song title", ... }"

Working with Beatmap

Setting values:

beatmap.dateEdited = new Date() /* OR */ Date.now();
beatmap.versionNumber = 0;
beatmap.gameVersion = "20.4.4";

Getting:

  • Normal values
beatmap.dateEdited; // 2022-01-01T00:00:00.000Z
beatmap.versionNumber; // 0
beatmap.gameVersion; // "20.4.4"
beatmap.workshopID; // -1

beatmap.getDateString(); // "2022-01-01_00.00.00"
  • JSON object
beatmap.toJson(); // { date_edited: "2022-01-01_00.00.00", ... }
  • JSON string
beatmap.toString(); // "{ date_edited: "2022-01-01_00.00.00", ... }"

Building the metadata

You can convert the metadata to a JSON string/object, then write it to a file.

const fs = require("fs");

fs.writeFileSync("metadata.lsb", metadata.toString());

Reading the metadata

You can read an existing metadata from the string/object.

const { Metadata } = require("pa-meta");
const fs = require("fs");

const jsonString = fs.readFileSync("metadata.lsb", "utf8");
const json = JSON.parse(jsonString);
const metadata = new Metadata();
metadata.fromJson(json);

Author

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2023 PA Toolkit. This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator