Add length
.
This commit is contained in:
parent
3af150ae49
commit
a0a68ab8d1
3 changed files with 14 additions and 1 deletions
|
@ -254,7 +254,11 @@ const Channel = function(bufferLength = 0) {
|
|||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(readOnly, `value`, { get: () => lastValue });
|
||||
Object.defineProperties(readOnly, {
|
||||
length: { get: () => bufferLength },
|
||||
value: { get: () => lastValue }
|
||||
});
|
||||
|
||||
Object.freeze(readOnly);
|
||||
|
||||
const writeOnly = Object.freeze({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue