Skip to content

Stack-based implementation of the Janitor library.

License

Notifications You must be signed in to change notification settings

mathfox/rbx-janitor

Repository files navigation

Overview

A stack-based Janitor implementation written in Luau for the Roblox platform with a TypeScript support.

Basic usage

const janitor = new Janitor()
	.addFn(() => {
		warn("third");
	})
	.addFn(() => {
		warn("second");
	})
	.addFn(() => {
		warn("first after connection was cleaned up");
	})
	.addConnection(
		game.DescendantAdded.Connect(() => {
			// some code
		})
	);

task.delay(1, () => {
    janitor.destroy()
    // or
    janitor.cleanup()
    // for further cleanup tasks
})

About

Stack-based implementation of the Janitor library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages