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

@rbxts/lyra

v0.6.1

Published

A DataStoreService wrapper

Readme

Wally

The @rbxts/lyra module is not maintained by paradoxum-games and is a personally maintained fork by @6ixfalls.

Lyra makes it easy to safely and robustly manage your game's player data. It's designed to handle large amounts of data, prevent common game-breaking bugs, and make it easy to update your data format without breaking existing saves.

Early Development

While Lyra has been tested and is used in production, it's still in early development. Some features, like transactions, while tested in controlled environments, have not yet been battle-tested in production at scale.

Avoid using Lyra in production games where data loss would be catastrophic until it has been tested more thoroughly.

Fork Note

This module is maintained relatively sporadically as I don't currently use @rbxts/lyra in my own games. Use at your own risk; Review the source as needed. This fork aims to maintain the least amount of additional code and as a result, no changes to the .luau files are done except when necessary to support roblox-ts as an architecture. TypeScript typings match the .luau types.

Ping @sixfalls in the roblox-ts Discord for any support or issues with using the package.

Features

  • Transactions - A powerful tool to implement features like trading, while making bugs like item duplication impossible
  • Session Locking - Prevents common bugs that lead to corruption and data loss
  • Validation - Ensures your data is always in a consistent state
  • Auto-Sharding - Handles large data by automatically splitting across multiple DataStore keys
  • Migrations - Update your data format without breaking existing saves
  • Drop-in - Import your existing data and switch over seamlessly

Quick Start

local store = Lyra.createPlayerStore({
    name = "PlayerData",
    template = {
        coins = 0,
        inventory = {},
    },
    schema = t.strictInterface({
        coins = t.number,
        inventory = t.table,
    }),
})

-- Load data when players join
Players.PlayerAdded:Connect(function(player)
    store:loadAsync(player)
end)

-- Free up resources when players leave
Players.PlayerRemoving:Connect(function(player)
    store:unloadAsync(player)
end)

-- Update data
store:updateAsync(player, function(data)
    data.coins += 100
    return true
end)

-- Atomic transactions
store:txAsync({player1, player2}, function(state)
    local amount = 50
    state[player1].coins -= amount
    state[player2].coins += amount
    return true
end)

TS examples

import { t } from "@rbxts/t";
import Lyra from "@rbxts/lyra";
import { Players } from "@rbxts/services";

const store = Lyra.createPlayerStore({
    name: "PlayerData",
    template: {
        coins: 0,
        inventory: {},
    },
    schema: t.strictInterface({
        coins: t.number,
        inventory: t.table,
    }),
});

// Load data when players join
Players.PlayerAdded.Connect((player) => {
    store.loadAsync(player);
});

// Free up resources when players leave
Players.PlayerRemoving.Connect((player) => {
    store.unloadAsync(player);
});

// Update data
store.updateAsync(player, (data) => {
    data.coins += 100;
    return true;
});

// Atomic transactions
store.txAsync([player1, player2], (state) => {
    const amount = 50;
    state.get(player1).coins -= amount;
    state.get(player2).coins += amount;
    return true;
});

Installation

Add to your wally.toml:

Lyra = "paradoxum-games/[email protected]"

Check out the documentation for guides, examples, and API reference.