nezuo / lapis

A DataStore abstraction library for Roblox
https://nezuo.github.io/lapis/
MIT License
55 stars 10 forks source link

Add callback to update document when it closes #23

Closed nezuo closed 10 months ago

nezuo commented 10 months ago

Currently, it's not possible to make final changes to a document when Document:close is called by game:BindToClose.

To solve this, I propose adding Document:beforeClose(callback: (data) -> ()). The document would call all the registered callbacks inside of Document:close before it saves the data.

nezuo commented 10 months ago

Closed in #25