JSPM

@rbxts/quicksave

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q29271F
  • License MIT

A port of evaera's quicksave package - a DataStore abstraction library

Package Exports

  • @rbxts/quicksave

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbxts/quicksave) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@rbxts/quicksave

NPM

Typings for evaera's quicksave package

Example Usage

const collection = quicksave.createCollection("data", {
    schema: {
        money: t.number,
        items: t.array(t.number),
    },
    defaultData: {
        money: 500,
        items: [],
    },
});

collection.getDocument("player").andThen((document) => {
    document.set("money", 1000);

    document.set(
        "items",
        document.get("items").map((item) => (item += 10)),
    );

    // NAUGHTY! not allowed!
    document.get("momey");

    document.set("money", [50]);
});

Installation

npm i @rbxts/quicksave

Changelog