@quenty/attributeutils 14.7.0 → 14.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [14.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@14.7.0...@quenty/attributeutils@14.8.0) (2024-10-04)
7
+
8
+
9
+ ### Performance Improvements
10
+
11
+ * Check AttributeValue index first ([e12d205](https://github.com/Quenty/NevermoreEngine/commit/e12d2057226429c4db0190f0274fc97d55289bcb))
12
+
13
+
14
+
15
+
16
+
6
17
  # [14.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@14.6.0...@quenty/attributeutils@14.7.0) (2024-09-25)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/attributeutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/attributeutils",
3
- "version": "14.7.0",
3
+ "version": "14.8.0",
4
4
  "description": "Provides utility functions to work with attributes in Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,17 +25,17 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/brio": "^14.7.0",
29
- "@quenty/canceltoken": "^11.6.0",
30
- "@quenty/loader": "^10.5.0",
31
- "@quenty/maid": "^3.3.0",
32
- "@quenty/promise": "^10.5.0",
33
- "@quenty/rx": "^13.7.0",
34
- "@quenty/rxsignal": "^7.7.0",
35
- "@quenty/symbol": "^3.1.0"
28
+ "@quenty/brio": "^14.8.0",
29
+ "@quenty/canceltoken": "^11.7.0",
30
+ "@quenty/loader": "^10.6.0",
31
+ "@quenty/maid": "^3.4.0",
32
+ "@quenty/promise": "^10.6.0",
33
+ "@quenty/rx": "^13.8.0",
34
+ "@quenty/rxsignal": "^7.8.0",
35
+ "@quenty/symbol": "^3.2.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "9b17fe79cddd071f0f06a9d35184e76b44bd6fe6"
40
+ "gitHead": "035abfa088c854a73e1c65b350267eaa17669646"
41
41
  }
@@ -83,7 +83,9 @@ end
83
83
  @within AttributeValue
84
84
  ]=]
85
85
  function AttributeValue:__index(index)
86
- if index == "Value" then
86
+ if AttributeValue[index] then
87
+ return AttributeValue[index]
88
+ elseif index == "Value" then
87
89
  local result = self._object:GetAttribute(rawget(self, "_attributeName"))
88
90
  local default = rawget(self, "_defaultValue")
89
91
  if result == nil then
@@ -95,8 +97,6 @@ function AttributeValue:__index(index)
95
97
  return self._object:GetAttributeChangedSignal(self._attributeName)
96
98
  elseif index == "AttributeName" then
97
99
  return rawget(self, "_attributeName")
98
- elseif AttributeValue[index] then
99
- return AttributeValue[index]
100
100
  else
101
101
  error(string.format("%q is not a member of AttributeValue", tostring(index)))
102
102
  end
@@ -26,7 +26,6 @@ function RxAttributeUtils.observeAttribute(instance, attributeName, defaultValue
26
26
  assert(type(attributeName) == "string", "Bad attributeName")
27
27
 
28
28
  return Observable.new(function(sub)
29
-
30
29
  local function handleAttributeChanged()
31
30
  local attributeValue = instance:GetAttribute(attributeName)
32
31
  if attributeValue == nil then