0.1.4 • Published 7 months ago

@rbxts/datastore-promises v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

datastore-promises

Promisifed DataStoreService. Currently does not support OrderedDataStore's (sorry!) or the Global DataStore (why are you using that anyways)

Same API as built-in DataStoreService. You can use this for reference: https://create.roblox.com/docs/reference/engine/classes/DataStoreService

Example

import DataStoreServiceAsync from "@rbxts/datastore-promises";

const Store = DataStoreServiceAsync.GetDataStore("TestStore");

Store.SetAsync("TestKey", "a").then(() => {
	Store.GetAsync("TestKey").then(([value]) => {
		print(value); // --> a
		Store.UpdateAsync("TestKey", (oldValue) => {
			return $tuple(`hello_${oldValue}`); // -- > changes the value to hello_ + the old value
		}).then(() => {
			// it's done!
		});
	});
});
0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago