@quenty/attributeutils 8.16.0 → 8.17.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 +4 -4
- package/src/Shared/AttributeValue.lua +9 -0
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.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@8.16.0...@quenty/attributeutils@8.17.0) (2023-07-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add :Observe() API calls to a variety of systems and allow Blend to :Observe() stuff ([ca29c68](https://github.com/Quenty/NevermoreEngine/commit/ca29c68164dfdaf136e9168faf48f487bed26088))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [8.16.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@8.15.0...@quenty/attributeutils@8.16.0) (2023-06-17)
|
|
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": "8.
|
|
3
|
+
"version": "8.17.0",
|
|
4
4
|
"description": "Provides utility functions to work with attributes in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/brio": "^8.
|
|
28
|
+
"@quenty/brio": "^8.15.0",
|
|
29
29
|
"@quenty/canceltoken": "^6.7.0",
|
|
30
30
|
"@quenty/loader": "^6.2.1",
|
|
31
31
|
"@quenty/maid": "^2.5.0",
|
|
32
32
|
"@quenty/promise": "^6.6.0",
|
|
33
|
-
"@quenty/rx": "^7.
|
|
33
|
+
"@quenty/rx": "^7.13.0",
|
|
34
34
|
"@quenty/symbol": "^2.2.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "af7a623f58fe7ec96b47c80e385b71f820fd4cb8"
|
|
40
40
|
}
|
|
@@ -21,6 +21,10 @@ 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
|
+
|
|
24
28
|
local AttributeValue = {}
|
|
25
29
|
AttributeValue.ClassName = "AttributeValue"
|
|
26
30
|
AttributeValue.__index = AttributeValue
|
|
@@ -51,6 +55,11 @@ function AttributeValue.new(object, attributeName, defaultValue)
|
|
|
51
55
|
return setmetatable(self, AttributeValue)
|
|
52
56
|
end
|
|
53
57
|
|
|
58
|
+
function AttributeValue:ObserveBrio(condition)
|
|
59
|
+
condition = condition or DEFAULT_PREDICATE
|
|
60
|
+
return RxAttributeUtils.observeAttributeBrio(self._object, self._attributeName, condition)
|
|
61
|
+
end
|
|
62
|
+
|
|
54
63
|
--[=[
|
|
55
64
|
Observes an attribute on an instance.
|
|
56
65
|
@return Observable<any>
|