1.0.0 • Published 3 years ago

@rbxts/quicksave v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@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