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/rblxdatastore

v0.1.1-beta.2

Published

A robust, strictly-typed Roblox DataStore library written in TypeScript (via [Roblox-TS](https://roblox-ts.com)) that organizes data with strictly-typed schemas, enforces strict validation, enables migrations that mutate data overtime, and features robust

Readme

RblxDataStore

A robust, strictly-typed Roblox DataStore library written in TypeScript (via Roblox-TS) that organizes data with strictly-typed schemas, enforces strict validation, enables migrations that mutate data overtime, and features robust error handling.

Overview

RblxDataStore provides a modern, structured way to manage Roblox DataStore operations by:

  • Enforcing strict schema validation
  • Supporting data transformation through a transformer that run before migrations
  • Handling data migrations over time
  • Offering two seperate classes for both session locked documents through CacheDocument and non session locked documents through ConcurrentDocument
  • Automatic cleanup on game shutdown via game.BindToClose

It is designed for developers who want predictable, type-safe, and scalable data handling in Roblox games.

Features

  • ✅ Strictly typed documents

  • ✅ Schema validation

  • ✅ Persistent Transformation for transformating data before migrations (Mainly used for reconcilation)

  • ✅ Migrations for evolving data structures

  • ✅ Session locking and non session locking document access

  • ✅ Automatic lifecycle management

  • ✅ Debug logging support for diagnosing internal issues

Core Concepts

Document Store

A RblxDocumentStore manages a collection of documents associated with a Roblox DataStore. Each document represents a single key-value record and can be accessed either:

  • Cached (CacheDocument) – Uses session locking in the type of the document to ensure only one document can edit the data at a time.
  • Concurrent (ConcurrentDocument) – Does not use session locking in the type of document, for multi-server editing.

Document Schema

Every document in RblxDataStore is strictly typed via a schema. You provide:

  • defaultSchema – Default values if a document does not exist.
  • schemaValidate – Function to validate data before writing.
  • transformation – Optional transformation applied on data, mainly for reconcilation.
  • migrations – Functions to upgrade/mutate data over time, they run on incremental versions.

Automatic Lifecycle Handling

By enabling bindToClose in the configuration:

  • All cache and concurrent documents are automatically closed when the game shuts down.
  • Prevents data loss and ensures proper cleanup.

Debug Mode

Though optional, you can enable the debug mode in the configuration to see detailed logging in data operations.

Usually used by the maintainers for diagnosing internal issues.

DISCLAIMERS

RblxDataStore is in early development and is actively updated. All features are subject to change. No stability guarantee can be given in the usage of this library.

Installation

npm install @rbxts/rblxdatastore

Examples

Soon