@quenty/attributeutils 8.17.0 → 8.18.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 +11 -0
- package/package.json +2 -2
- package/src/Shared/AttributeValue.lua +6 -5
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
|
+
# [8.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@8.17.0...@quenty/attributeutils@8.18.0) (2023-07-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* No default predicate ([1d41dd2](https://github.com/Quenty/NevermoreEngine/commit/1d41dd2f419c04f45c0fa43d9bfc8608f88adbf4))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [8.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@8.16.0...@quenty/attributeutils@8.17.0) (2023-07-15)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/attributeutils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.0",
|
|
4
4
|
"description": "Provides utility functions to work with attributes in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "c1fbe93a0a20b5c0c4b9ffbbac771926b07ac251"
|
|
40
40
|
}
|
|
@@ -21,10 +21,6 @@ local require = require(script.Parent.loader).load(script)
|
|
|
21
21
|
|
|
22
22
|
local RxAttributeUtils = require("RxAttributeUtils")
|
|
23
23
|
|
|
24
|
-
local DEFAULT_PREDICATE = function(value)
|
|
25
|
-
return value
|
|
26
|
-
end
|
|
27
|
-
|
|
28
24
|
local AttributeValue = {}
|
|
29
25
|
AttributeValue.ClassName = "AttributeValue"
|
|
30
26
|
AttributeValue.__index = AttributeValue
|
|
@@ -55,8 +51,13 @@ function AttributeValue.new(object, attributeName, defaultValue)
|
|
|
55
51
|
return setmetatable(self, AttributeValue)
|
|
56
52
|
end
|
|
57
53
|
|
|
54
|
+
--[=[
|
|
55
|
+
Handles observing the value conditionalli
|
|
56
|
+
|
|
57
|
+
@param condition function | nil
|
|
58
|
+
@return Observable<Brio<any>>
|
|
59
|
+
]=]
|
|
58
60
|
function AttributeValue:ObserveBrio(condition)
|
|
59
|
-
condition = condition or DEFAULT_PREDICATE
|
|
60
61
|
return RxAttributeUtils.observeAttributeBrio(self._object, self._attributeName, condition)
|
|
61
62
|
end
|
|
62
63
|
|