Js.signals

Latest version: v0.8.1

Safety actively analyzes 628499 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 4

0.3

API changes

- Renamed:
- `Signal.prototype.stopPropagation()` -> `Signal.prototype.halt()`
- `Signal.prototype.pause()` -> `Signal.prototype.disable()`
- `Signal.prototype.resume()` -> `Signal.prototype.enable()`
- `Signal.prototype.isPaused()` -> `Signal.prototype.isEnabled()`
- `SignalBinding.prototype.pause()` -> `SignalBinding.prototype.disable()`
- `SignalBinding.prototype.resume()` -> `SignalBinding.prototype.enable()`
- `SignalBinding.prototype.isPaused()` -> `SignalBinding.prototype.isEnabled()`

Fixes

- Calling `halt()` before/after `dispatch()` doesn't affect listeners execution anymore, `halt()` only works during propagation.

Test Changes

- updated API calls to reflect new method names.
- added tests that match `halt()` before/after `dispatch()`.

Other

Added inline documentation to source code and included an HTML version of the documentation together with distribution files.

0.2

API changes

- Added:
- `Signal.prototype.pause()`
- `Signal.prototype.resume()`
- `Signal.prototype.isPaused()`
- `Signal.prototype.stopPropagation()`

Fixes

- `SignalBinding.prototype.isPaused()`

Test Changes

- Increased test coverage a lot.
- Tests added:
- pause/resume (for individual bindings and signal)
- stopPropagation (using `return false` and `Signal.prototype.stopPropagation()`)
- `SignalBindings.prototype.isOnce()`
- if same listener added twice returns same binding

Other

Small refactoring and code cleaning.

0.1

- initial release, support of basic features.

Page 4 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.