node-addon-api 8.3.1 → 8.4.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/README.md +2 -2
- package/napi-inl.h +5 -0
- package/napi.h +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ and exception handling semantics with low overhead.
|
|
|
19
19
|
API references are available in the [doc](doc/README.md) directory.
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-start-version -->
|
|
22
|
-
## Current version: 8.
|
|
22
|
+
## Current version: 8.4.0
|
|
23
23
|
<!-- x-release-please-end -->
|
|
24
24
|
|
|
25
25
|
(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
|
|
@@ -92,4 +92,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around
|
|
|
92
92
|
|
|
93
93
|
Licensed under [MIT](./LICENSE.md)
|
|
94
94
|
|
|
95
|
-
[Node-API support matrix]: https://nodejs.org/dist/latest/docs/api/n-api.html#
|
|
95
|
+
[Node-API support matrix]: https://nodejs.org/dist/latest/docs/api/n-api.html#node-api-version-matrix
|
package/napi-inl.h
CHANGED
|
@@ -1577,6 +1577,11 @@ inline Object::PropertyLValue<Key>& Object::PropertyLValue<Key>::operator=(
|
|
|
1577
1577
|
return *this;
|
|
1578
1578
|
}
|
|
1579
1579
|
|
|
1580
|
+
template <typename Key>
|
|
1581
|
+
inline Value Object::PropertyLValue<Key>::AsValue() const {
|
|
1582
|
+
return Value(*this);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1580
1585
|
template <typename Key>
|
|
1581
1586
|
inline Object::PropertyLValue<Key>::PropertyLValue(Object object, Key key)
|
|
1582
1587
|
: _env(object.Env()), _object(object), _key(key) {}
|
package/napi.h
CHANGED
|
@@ -860,6 +860,9 @@ class Object : public TypeTaggable {
|
|
|
860
860
|
template <typename ValueType>
|
|
861
861
|
PropertyLValue& operator=(ValueType value);
|
|
862
862
|
|
|
863
|
+
/// Converts an L-value to a value. For convenience.
|
|
864
|
+
Value AsValue() const;
|
|
865
|
+
|
|
863
866
|
private:
|
|
864
867
|
PropertyLValue() = delete;
|
|
865
868
|
PropertyLValue(Object object, Key key);
|