messages listlengths 1 1 |
|---|
[
{
"role": "assistant",
"content": "return {\n\tDisabled = {\n\t\tName = 'Disabled',\n\t\tFill = 'colors/Fill_Color/Control/Disabled',\n\t\tStroke = 'colors/Stroke_Color/Control_Stroke/Default',\n\t\tText = 'colors/Fill_Color/Text/Disabled',\n\t},\n\tRest = {\n\t\tName = 'Rest',\n\t\tFill = 'colors/Fill_Colo... |
[
{
"role": "assistant",
"content": "-- DropdownButton: A button that is meant to be used as the button for dropdown components\n\nlocal Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\nlocal ApplyDescription = ... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal ... |
[
{
"role": "assistant",
"content": "return {\n\tRest = {\n\t\tName = 'Rest',\n\t\tText = 'colors/Fill_Color/Accent_Text/Primary',\n\t},\n\tHover = {\n\t\tName = 'Hover',\n\t\tText = 'colors/Fill_Color/Accent_Text/Secondary',\n\t},\n\tPressed = {\n\t\tName = 'Pressed',\n\t\tText = 'colors/Fill_Color/Accent_Te... |
[
{
"role": "assistant",
"content": "-- Hyperlink: Hyperlink Compoent\n\nlocal Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\nlocal RegisterStateAction = Theme.RegisterStateAction\nlocal ApplyDescription = The... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal HyperlinkButton = require(script.Parent.HyperlinkButton)\nlocal Hyperlink... |
[
{
"role": "assistant",
"content": "local TRANSPARENT = {\n\tColor = Color3.new(),\n\tTransparency = 1,\n}\n\nreturn {\n\tRest = {\n\t\tFocus = {\n\t\t\tButton = 'colors/Fill_Color/Text/Secondary',\n\t\t\tHighlight = 'colors/Fill_Color/Accent/Default',\n\t\t\tStroke = 'colors/Stroke_Color/Control_Stroke/Defa... |
[
{
"role": "assistant",
"content": "-- TextInput: A string input component, a textbox\n\nlocal Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\nlocal ApplyDescription = Theme.ApplyDescription\nlocal RegisterSta... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal TextInput = require(script.Parent.TextInput)\nlocal TextInputStory = Roac... |
[
{
"role": "assistant",
"content": "\nreturn {\n\tNoFill = {\n\t\tDisabled = {\n\t\t\tName = 'NoFill/Disabled',\n\t\t\tIndicatorHeight = 0,\n\t\t\tFill = \"colors/Fill_Color/Subtle/Disabled\",\n\t\t\tIndicator = \"colors/Fill_Color/Accent/Disabled\",\n\t\t\tStroke = \"colors/Fill_Color/Subtle/Disabled\",\n\t... |
[
{
"role": "assistant",
"content": "-- Expander: An expandable list collector\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal GetTextSize = require(Winro.Utility.GetTextSize)\n\nlocal Sift = require(... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal Expander = require(script.Parent.Expander)\n\nlocal ExpanderStory = Roact.PureCo... |
[
{
"role": "assistant",
"content": "-- Simple divider, with theme\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal WithTheme = require(Winro.Theme).WithTheme\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal ListDivider = Roact.PureComponent:... |
[
{
"role": "assistant",
"content": "-- ListItem: A list item\n-- Assets/Lists & Collections/Lists & Collections/List View/List Item\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\nlocal ApplyDescription = Th... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal FrameVisualizer = require(Winro.Utility.FrameVisualizer)\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require... |
[
{
"role": "assistant",
"content": "-- ContextMenu: A Context menu element\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal Validators = Winro.Validators\nlocal StyleValidator = require(Validators.Sty... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal FrameVisualizer = require(Winro.Utility.FrameVisualizer)\nlocal ContextMenu = re... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal RadialProgressBar = require(script.Parent.RadialProgressBar)\nlocal RadialProgre... |
[
{
"role": "assistant",
"content": "-- Acrylic: The acrylic surface\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal WithTheme = require(Winro.Theme).WithTheme\n\... |
[
{
"role": "assistant",
"content": "-- RoundedSurface: A rounded surface with individual corner visibility support\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal Validators = Winro.Validators\nlocal... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal SurfaceRoot = script.Parent\nlocal RoundedSurface = require(SurfaceRoot.RoundedS... |
[
{
"role": "assistant",
"content": "-- Window: A component that is the base structure for a UI Window\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal Sift = require(Packages.Sift)\nlocal t = require(... |
[
{
"role": "assistant",
"content": "-- TitleBar: The top bar of a window component\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal FrameVisualizer = require(Winro.Utility.FrameVisualizer)\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal... |
[
{
"role": "assistant",
"content": "-- CaptionClose: The TitleBar close button\n\nlocal Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\nlocal RegisterStateAction = Theme.RegisterStateAction\n\nlocal Validators... |
[
{
"role": "assistant",
"content": "-- TitleBar: The top bar of a window component\n\nlocal Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal Validators = Winro.Validators\nlocal StyleValidator = require... |
[
{
"role": "assistant",
"content": "-- TitleBar: The top bar of a window component\n\nlocal Winro = script.Parent.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal FrameVisualizer = require(Winro.Utility.FrameVisualizer)\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)... |
[
{
"role": "assistant",
"content": "-- Window: A component that is the base structure for a UI Window\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal WithTheme = Theme.WithTheme\n\nlocal Validators = Winro.Validators\nlocal StyleValidat... |
[
{
"role": "assistant",
"content": "-- TitleBar: The top bar of a window component\n\nlocal Winro = script.Parent.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal FrameVisualizer = require(Winro.Utility.FrameVisualizer)\n\nlocal Sift = require(Packages.Sift)\nlocal Roact = require(Packages.Roact)\nlocal... |
[
{
"role": "assistant",
"content": "local Packages = script.Parent.Parent.Parent\nlocal Flipper = require(Packages.Flipper)\n\nlocal function CollectKeypoints(Sequence)\n\n\tif typeof(Sequence) == 'ColorSequence' then\n\n\t\t-- Extract each keypoint\n\t\tlocal Keypoints = {}\n\n\t\tfor Index, Keypoint in pai... |
[
{
"role": "assistant",
"content": "return function (self, Event, State)\n\n\tself[Event] = function(...)\n\t\t\n\t\t-- Set state\n\t\tself:setState({\n\t\t\tState = State\n\t\t})\n\t\t\n\t\t-- Custom callback\n\t\tlocal Callback = self.props[Event]\n\t\tif Callback then\n\t\t\tCallback(...)\n\t\tend\n\tend\... |
[
{
"role": "assistant",
"content": "local Theme = script.Parent\nlocal Winro = Theme.Parent\nlocal Roact = require(Winro.parent.Roact)\n\nreturn Roact.createContext(nil)\n"
}
] |
[
{
"role": "assistant",
"content": "local StarterGui = game:GetService(\"StarterGui\")\nlocal Theme = script.Parent\nlocal Winro = Theme.Parent\nlocal Packages = Winro.Parent\n\nlocal Roact = require(Packages.Roact)\nlocal StyleContext = require(Theme.StyleContext)\n\nlocal StyleProvider = Roact.Component:ex... |
[
{
"role": "assistant",
"content": "local AccentColor = Color3.fromRGB(118, 185, 237) -- Color3.fromRGB(96, 205, 255)\nreturn {\n\t[\"colors/Fill_Color/Text/Primary\"] = {\n\t\tColor = Color3.fromRGB(255, 255, 255),\n\t\tTransparency = 0,\n\t},\n\t[\"colors/Fill_Color/Text/Secondary\"] = {\n\t\tColor = Color... |
[
{
"role": "assistant",
"content": "return {\n\t['colors/Fill_Color/Text/Primary'] = {\n\t\tColor = Color3.fromRGB(0, 0, 0);\n\t\tTransparency = 0.10588235294117643;\n\t};\n\t['colors/Fill_Color/Text/Secondary'] = {\n\t\tColor = Color3.fromRGB(0, 0, 0);\n\t\tTransparency = 0.3921568627450981;\n\t};\n\t['colo... |
[
{
"role": "assistant",
"content": "local Offset = 0\nlocal HeightOffset = Offset\nlocal Styles = {\n ['fonts/Caption'] = {\n Font = Font.fromEnum(Enum.Font.Gotham),\n Size = 12 + Offset,\n LineHeight = 16 + HeightOffset,\n ParagraphSpacing = 0,\n LetterSpacing = 0.0,\n ... |
[
{
"role": "assistant",
"content": "local Offset = 4\nlocal HeightOffset = 0\nlocal Styles = {\n ['fonts/Caption'] = {\n Font = Font.fromEnum(Enum.Font.SourceSans),\n Size = 12 + Offset,\n LineHeight = 16 + HeightOffset,\n ParagraphSpacing = 0,\n LetterSpacing = 0.0,\n ... |
[
{
"role": "assistant",
"content": "return {\n\t['images/Fluent/AcceptMedium/12px'] = {\n\t\tImage = 'rbxassetid://11654334168',\n\t\tImageRectOffset = Vector2.new(),\n\t\tImageRectSize = Vector2.new(12, 12),\n\t\tResampleMode = Enum.ResamplerMode.Default\n\t},\n\t['images/Fluent/ChevronDownMed/12px'] = {\n\... |
[
{
"role": "assistant",
"content": "--[[ Fallback spritesheet image to use if CorePackages is unavailable\nCheck out https://confluence.rbx.com/display/MOBAPP/uiBlox+ImageSet to see how to update the sprite sheets\nYOUR SPRITE SHEETS MAY GET MODERATED BECAUSE OF BRANDED CONTENT, refer to the work around in t... |
[
{
"role": "assistant",
"content": "-- Internally used roblox icons\n\nlocal FallbackImages = require(script.FallbackImages)\nlocal GetImageSetData = require(script.GetImageSetData)\n\n-- Format each image\nlocal Images = {}\nfor ImagePath, ImageData in pairs(GetImageSetData(1)) do\n\tlocal Image = {\n\t\tIm... |
[
{
"role": "assistant",
"content": "return {\n ['styles/BorderSizePixel/Shell/Window'] = 1,\n ['styles/CornerRadius/Default/Outer'] = 8,\n\t['styles/CornerRadius/Default/Inner'] = 4,\n\t['styles/Padding/Default/Outer/Left'] = 25,\n\t['styles/Padding/Default/Outer/Right'] = 25,\n\t['styles/Padding/Defau... |
[
{
"role": "assistant",
"content": "-- Theme: The theming utility used all throught Winro\n\nlocal Winro = script.Parent\nlocal Packages = Winro.Parent\n\nlocal Roact = require(Packages.Roact)\nlocal Sift = require(Packages.Sift)\nlocal strict = require(Winro.strict)\n\n-- Theme\nlocal Theme = {\n\tProvider ... |
[
{
"role": "assistant",
"content": "local Theme = script.Parent\nlocal Winro = Theme.Parent\nlocal Packages = Winro.Parent\n\nlocal Roact = require(Packages.Roact)\nlocal StyleConsumer = require(Theme.StyleConsumer)\n\n-- Since our style consumer object receives the whole update-able container,\n-- we need t... |
[
{
"role": "assistant",
"content": "local Winro = script.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal WireframeVisualizer = Roact.PureComponent:extend(script.Name)\n\nlocal ClassToColor = {\n\tFrame = Color3.new(1, 0, 0),\n\tT... |
[
{
"role": "assistant",
"content": "local TextService = game:GetService(\"TextService\")\n\nreturn function(String, Font, Size, LineHeight)\n\n\tlocal GotTextSize, TextSize = pcall(function()\n\n\t\tlocal Params = Instance.new('GetTextBoundsParams')\n\t\tParams.Text = String\n\t\tParams.Font = Font\n\t\tPara... |
[
{
"role": "assistant",
"content": "--[[\n\tThis function returns a type checker based on the provided value\n]]\n\nlocal Winro = script.Parent.Parent\nlocal Packages = Winro.Parent\n\nlocal t = require(Packages.t)\n\nlocal function GetValidator(Value, NoTable)\n\t\n\t-- Get the type\n\tlocal Type = typeof(V... |
[
{
"role": "assistant",
"content": "-- StyleValidator: Validates a style\n\nreturn function (Style, ...)\n\tlocal Type = typeof(Style)\n\t\n\treturn (Type == 'string' or Type == 'table'), 'Invalid style type. expected string or table, got '..typeof(Style)\nend\n"
}
] |
[
{
"role": "assistant",
"content": "local Winro = script.Parent\nlocal Packages = Winro.Parent\n\nlocal Theme = require(Winro.Theme)\nlocal ThemeProvider = Theme.Provider\n\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal function SortProps(Props)\n\ttable.sort(Props, function... |
[
{
"role": "assistant",
"content": "local App = script.App\n\nlocal Winro = {\n\tTheme = require(script.Theme),\n\t\n\tUtility = {\n\t\tGetTextSize = require(script.Utility.GetTextSize),\n\t},\n\n\tApp = {\n\n\t\tEffect = {\n\t\t\tDropShadow = require(App.Effect.DropShadow),\n\t\t},\n\t\tFlyout = {\n\t\t\tFl... |
[
{
"role": "assistant",
"content": "--!strict\nlocal function strict(t: { [any]: any }, name: string?)\n\t-- FIXME Luau: Need to define a new variable since reassigning `name = ...`\n\t-- doesn't narrow the type\n\tlocal newName = name or tostring(t)\n\n\treturn setmetatable(t, {\n\t\t__index = function(_sel... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function at\n\t@within Array\n\n\t@param array {T} -- The array to get the value from.\n\t@param index number -- The index to get the value from (can be negative).\n\t@return T -- The value at the given index.\n\n\tGets a value from an array at the giv... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal None = require(Sift.None)\n\n--[=[\n\t@function concat\n\t@within Array\n\n\t@param ... ...any -- The arrays to concatenate.\n\t@return {T} -- The concatenated array.\n\n\tJoins multiple arrays together into a single ar... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal CopyDeep = require(script.Parent.copyDeep)\nlocal None = require(Sift.None)\n\n--[=[\n\t@function concatDeep\n\t@within Array\n\n\t@param ... ...any -- The arrays to concatenate.\n\t@return {T} -- The concatenated array... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function copy\n\t@within Array\n\n\t@param array {T} -- The array to copy.\n\t@return {T} -- The copied array.\n\n\tCopies an array.\n\n\t```lua\n\tlocal array = { 1, 2, 3 }\n\n\tlocal new = Copy(array) -- { 1, 2, 3 }\n\n\tprint(new == array) -- false\... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function copyDeep\n\t@within Array\n\n\t@param array {T} -- The array to copy.\n\t@return {T} -- The copied array.\n\n\tCopies an array, with deep copies of all nested arrays.\n\n\t```lua\n\tlocal array = { 1, 2, 3, { 4, 5 } }\n\n\tlocal result = CopyD... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\n--[=[\n\t@function count\n\t@within Array\n\n\t@param array {T} -- The array to count the number of items in.\n\t@param predicate? (value: T, index: number, array: {T}) -> any -- The predica... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n @function create\n @within Array\n\n @param length number -- The length of the array to create.\n @param value? T -- The value to fill the array with.\n @return {T} -- The created array.\n\n Creates an array of the given length, filled with the giv... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\nlocal function compare(a, b)\n\tif type(a) ~= \"table\" or type(b) ~= \"table\" then\n\t\treturn a == b\n\tend\n\n\tlocal aLength = #a\n\n\tif #b ~= aLength then\n\t\treturn false\n\tend\n\n... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\nlocal function compareDeep(a, b)\n\tif type(a) ~= \"table\" or type(b) ~= \"table\" then\n\t\treturn a == b\n\tend\n\n\tlocal aLength = #a\n\n\tif #b ~= aLength then\n\t\treturn false\n\tend... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function every\n\t@within Array\n\n\t@param array {T} -- The array to check.\n\t@param predicate (value: T, index: number, array: {T}) -> any -- The predicate to use to check the array.\n\t@return boolean -- Whether every item in the array passes the p... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\n--[=[\n\t@function filter\n\t@within Array\n\n\t@param array {T} -- The array to filter.\n\t@param filterer? (value: T, index: number, array: {T}) -> any -- The callback to use to filter the... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function find\n\t@within Array\n\n\t@param array {T} -- The array to search.\n\t@param value? any -- The value to search for.\n\t@param from? number -- The index to start searching from.\n\t@return number? -- The index of the first item in the array th... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function findLast\n\t@within Array\n\n\t@param array {T} -- The array to search.\n\t@param value? any -- The value to search for.\n\t@param from? number -- The index to start searching from.\n\t@return number? -- The index of the last item in the array... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function findWhere\n\t@within Array\n\n\t@param array {T} -- The array to search.\n\t@param predicate (value: T, index: number, array: {T}) -> any -- The predicate to use to check the array.\n\t@param from? number -- The index to start searching from.\... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function findWhereLast\n\t@within Array\n\n\t@param array {T} -- The array to search.\n\t@param predicate (value: T, index: number, array: {T}) -> any -- The predicate to use to check the array.\n\t@param from? number -- The index to start searching fr... |
[
{
"role": "assistant",
"content": "--!strict\nlocal At = require(script.Parent.at)\n\n--[=[\n\t@function first\n\t@within Array\n\n\t@param array {T} -- The array to get the first item from.\n\t@return T -- The first item in the array.\n\n\tGets the first item in the array.\n\n\t```lua\n\tlocal array = { 1,... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function flatten\n\t@within Array\n\n\t@param array {T} -- The array to flatten.\n\t@param depth? number -- The depth to flatten the array to.\n\t@return {T} -- The flattened array.\n\n\tFlattens an array. If depth is not specified, it will flatten\n\t... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Copy = require(script.Parent.copy)\n\n--[=[\n @function freeze\n @within Array\n\n @param array {T} -- The array to freeze.\n @return {T} -- The frozen array.\n\n Freezes the top level of the array, making it read-only.\n\n ```lua\n local array = { ... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function freezeDeep\n\t@within Array\n\n\t@param array {T} -- The array to freeze.\n\t@return {T} -- The frozen array.\n\n\tFreezes the entire array, making it read-only, including all\n\tnested arrays.\n\n\t```lua\n\tlocal array = { 1, 2, 3, { 4, 5, 6... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Find = require(script.Parent.find)\n\n--[=[\n\t@function includes\n\t@within Array\n\n\t@param array {T} -- The array to search.\n\t@param value any -- The value to search for.\n\t@param from? number -- The index to start searching from.\n\t@return boolean... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@class Array\n\n\tAn array is a table consisting of index-value pairs. You don't need to\n\tmanually specify the indices when you create an array.\n\n\t```lua\n\tlocal array = {\n\t\t\"hello\",\n\t\t\"world\",\n\t}\n\t```\n\n\t<br><br>\n\n\t#### Aliases... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function insert\n\t@within Array\n\n\t@param array {T} -- The array to insert the value into.\n\t@param index number -- The index to insert the value at (can be negative).\n\t@param values ...T -- The values to insert.\n\t@return {T} -- The array with ... |
[
{
"role": "assistant",
"content": "--!strict\nlocal At = require(script.Parent.at)\n\n--[=[\n\t@function last\n\t@within Array\n\n\t@param array {T} -- The array to get the last element of.\n\t@return T -- The last element of the array.\n\n\tGets the last element of the array.\n\n\t```lua\n\tlocal array = {... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function map\n\t@within Array\n\n\t@param array {T} -- The array to map.\n\t@param mapper (value: T, index: number, array: {T}) -> U? -- The mapper function.\n\t@return {U} -- The mapped array.\n\n\tMaps the array using the mapper function.\n\n\t```lua... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function pop\n\t@within Array\n\n\t@param array {T} -- The array to pop an element from.\n\t@param count? number = 1 -- The number of elements to pop.\n\t@return {T} -- An array with the popped elements removed.\n\n\tRemoves an element from the end of ... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function push\n\t@within Array\n\n\t@param array {T} -- The array to push an element to.\n\t@param ... ...T -- The elements to push.\n\t@return {T} -- The array with the pushed elements.\n\n\tAdds elements to the end of the array.\n\n\t#### Aliases\n\n... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function reduce\n\t@within Array\n\n\t@param array {T} -- The array to reduce.\n\t@param reducer (accumulator: U, value: T, index: number, array: {T}) -> U -- The reducer to use.\n\t@param initialReduction? U = {T}[1] -- The initial accumulator value.\... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function reduceRight\n\t@within Array\n\n\t@param array {T} -- The array to reduce.\n\t@param reducer (accumulator: U, value: T, index: number, array: {T}) -> U -- The reducer to use.\n\t@param initialReduction? U = {T}[#{T}] -- The initial accumulator... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function removeIndex\n\t@within Array\n\n\t@param array {T} -- The array to remove the value from.\n\t@param index number -- The index to remove the value from (can be negative).\n\t@return {T} -- The array with the value removed.\n\n\tRemoves a value ... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function removeIndices\n\t@within Array\n\n\t@param array {T} -- The array to remove the indices from.\n\t@param ... ...number -- The indices to remove the values from (can be negative).\n\t@return {T} -- The array with the values removed.\n\n\tRemoves... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function removeValue\n\t@within Array\n\n\t@param array {T} -- The array to remove the value from.\n\t@param value T -- The value to remove.\n\t@return {T} -- The array with the value removed.\n\n\tRemoves a value from an array.\n\n\t```lua\n\tlocal ar... |
[
{
"role": "assistant",
"content": "--!strict\nlocal ToSet = require(script.Parent.toSet)\n\n--[=[\n\t@function removeValues\n\t@within Array\n\n\t@param array {T} -- The array to remove values from.\n\t@param ... T -- The values to remove.\n\t@return {T} -- The array with the values removed.\n\n\tRemoves va... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function reverse\n\t@within Array\n\n\t@param array {T} -- The array to reverse.\n\t@return {T} -- The reversed array.\n\n\tReverses the order of the items in an array.\n\n\t```lua\n\tlocal array = { 1, 2, 3 }\n\n\tlocal new = Reverse(array) -- { 3, 2,... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function set\n\t@within Array\n\n\t@param array {T} -- The array to set the value on.\n\t@param index number -- The index to set the value at (can be negative).\n\t@param value T -- The value to set.\n\t@return {T} -- The array with the value set.\n\n\... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function shift\n\t@within Array\n\n\t@param array {T} -- The array to shift.\n\t@param count? number -- The number of items to shift.\n\t@return {T} -- The shifted array.\n\n\tRemoves the first item from an array and returns the array\n\twith the item ... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Copy = require(script.Parent.copy)\n\n--[=[\n\t@function shuffle\n\t@within Array\n\n\t@param array {T} -- The array to shuffle.\n\t@return {T} -- The shuffled array.\n\n\tRandomises the order of the items in an array.\n\n\t```lua\n\tlocal array = { 1, 2, ... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function slice\n\t@within Array\n\n\t@param array {T} -- The array to slice.\n\t@param from? number -- The index to start from (can be negative).\n\t@param to? number -- The index to end at (can be negative).\n\t@return {T} -- The sliced array.\n\n\tSl... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function some\n\t@within Array\n\n\t@param array {T} -- The array to check.\n\t@param predicate (value: T, index: number, array: {T}) -> any -- The predicate to use to check the array.\n\t@return boolean -- Whether some item in the array passes the pre... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Copy = require(script.Parent.copy)\n\n--[=[\n\t@function sort\n\t@within Array\n\n\t@param array {T} -- The array to sort.\n\t@param comparator? (a: T, b: T) -> boolean -- The comparator function.\n\t@return {T} -- The sorted array.\n\n\tSorts an array.\n\... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function splice\n\t@within Array\n\n\t@param array {T} -- The array to splice.\n\t@param start? number -- The index to start splicing at (can be negative).\n\t@param end? number -- The index to end splicing at (can be negative).\n\t@param ... ...T -- T... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\nlocal _T = require(Sift.Types)\n\n--[=[\n\t@function toSet\n\t@within Array\n\n\t@param array {T} -- The array to convert to a set.\n\t@return Set<T> -- The set.\n\n\tConverts an array to a set.\n\n\t```lua\n\tlocal array = { \... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n\t@function unshift\n\t@within Array\n\n\t@param array {T} -- The array to insert the values to.\n\t@param ... ...T -- The values to insert.\n\t@return {T} -- The array with the values inserted.\n\n\tInserts values to the beginning of an array.\n\n\t#### ... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\nlocal Copy = require(script.Parent.copy)\n\ntype Callback<T> = (index: number) -> T\ntype Updater<T> = (currentValue: T, index: number) -> T\n\nlocal function call<T>(callback: Callback<T>, in... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Reduce = require(script.Parent.reduce)\n\n--[=[\n\t@function zip\n\t@within Array\n\n\t@param ... {any} -- The arrays to zip together.\n\t@return {any} -- The zipped array.\n\n\tZips multiple arrays together into a single array.\n\n\t```lua\n\tlocal table1... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Reduce = require(script.Parent.reduce)\nlocal None = require(Sift.None)\n\n--[=[\n\t@function zipAll\n\t@within Array\n\n\t@param ... ...{any} -- The arrays to zip.\n\t@return {any} -- The zipped array.\n\n\tZips multip... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n @function copy\n @within Dictionary\n\n @param dictionary T -- The dictionary to copy.\n @return T -- The copied dictionary.\n\n Copies a dictionary.\n\n ```lua\n local dictionary = { hello = \"world\" }\n\n local new = Copy(dictionary) -- { hell... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n @function copyDeep\n @within Dictionary\n\n @param dictionary T -- The dictionary to copy.\n @return T -- The copied dictionary.\n\n Copies a dictionary recursively.\n\n ```lua\n local dictionary = { hello = { world = \"goodbye\" } }\n\n local ne... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\n--[=[\n @function count\n @within Dictionary\n\n @param dictionary T -- The dictionary to count.\n @param predicate? (value: T, key: K, dictionary: T) -> any -- The predicate to use to f... |
[
{
"role": "assistant",
"content": "--!strict\n--[=[\n @function entries\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to get the entries from.\n @return {{ K, V }} -- The entries in the dictionary.\n\n Returns the entries in the given dictionary as an array of key-value pairs.\n... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\nlocal _T = require(Sift.Types)\n\nlocal function compare(a, b)\n\tif type(a) ~= \"table\" or type(b) ~= \"table\" then\n\t\treturn a == b\n\tend\n\n\tfor key, value in pairs(a) do\n\t\tif b[ke... |
[
{
"role": "assistant",
"content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\nlocal _T = require(Sift.Types)\n\nlocal function compareDeep(a, b)\n\tif type(a) ~= \"table\" or type(b) ~= \"table\" then\n\t\treturn a == b\n\tend\n\n\tfor key, value in pairs(a) do\n\t\tif ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.