@rbxts/strict-map
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Strict Map

CI status PRs Welcome License: MIT Discord server

Strict Map is a simple class that looks like a regular map but that throws if indexed by a missing key.

Installation

roblox-ts

Simply install to your roblox-ts project as follows:

npm i @rbxts/strict-map

Wally

Wally users can install this package by adding the following line to their Wally.toml under [dependencies]:

StrictMap = "bytebit/strict-map@1.0.2"

Then just run wally install.

From model file

Model files are uploaded to every release as .rbxmx files. You can download the file from the Releases page and load it into your project however you see fit.

From model asset

New versions of the asset are uploaded with every release. The asset can be added to your Roblox Inventory and then inserted into your Place via Toolbox by getting it here.

Documentation

Documentation can be found here, is included in the TypeScript files directly, and was generated using TypeDoc.

Example

A brief description of the example

roblox-ts example
import { PackageClass, packageFunction } from "@rbxts/strict-map";

export class PackageConsumer {
}
Luau example
local PackageClass = require(path.to.modules["strict-map"]).PackageClass
local packageFunction = require(path.to.modules["strict-map"]).packageFunction

local PackageConsumer = {}
PackageConsumer.__index = PackageConsumer

function new()
  local self = {}
  setmetatable(self, PackageConsumer)

  return self
end

return {
  new = new
}

Readme

Keywords

none

Package Sidebar

Install

npm i @rbxts/strict-map

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

11.3 kB

Total Files

11

Last publish

Collaborators

  • noahwillcrow