1.3.0 • Published 5 years ago

@rbxts/datastore-light v1.3.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

@rbxts/datastore-light

NPM

Installation: npm i @rbxts/datastore-light

Example use:

import { DataStore } from "@rbxts/datastore-light"

let MainStore = new DataStore<string>("Main", "MyScope", math.huge) // Creates a new DataStore object with the type 'string', the name 'main', the scope 'MyScope' and an infinite amount of retries

MainStore.set("hello", "hi")
MainStore.get("hello") // hi
MainStore.remove("hello")

// or use promises
// promises can be cancelled and will stop attempting on the next retry

MainStore.setAsync("hello", "hi").then(() => {
    return MainStore.getAsync("hello") // promise that resolves to "hi"
}).then(() => {
    return MainStore.removeAsync("hello")
})

Ordered data stores have 2 new APIs. getOrdered and getOrderedAsync which function similarly to how they're documented on the Roblox Developer Hub.

API Reference

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago