-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Standard #8
add Standard #8
Conversation
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
observer.set = function (value) { | ||
if(filter(value, _value)) { | ||
if(listener) listener(value = _value) | ||
observer.set = function (_value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
value = nextValue | ||
let length = listeners.length | ||
for (let i = 0; i < length && value === nextValue; i++) { | ||
for (let i = 0; i < length && value === nextValue; i++) { // eslint-disable-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can confirm that removing value === nextValue
here breaks tests.
standard is correct that value
/nextValue
are not mutated in this loop, however value can be mutated by set
while these loops are running, so yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I think the code looks correct. I also ran the test suite locally
esbuild
surfaced some bugs, which got me wondering ifstandard
would have.Turns out it did... these are the important ones (but there were also a few unused vars to tidy):