Socket
Socket
Sign inDemoInstall

knockout-decorators

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knockout-decorators - npm Package Versions

13

0.9.0

Diff

gnaeus
published 0.8.0 •

Changelog

Source

[0.8.0] - 2017-01-22

Added

  • subscribe(() => this.observableProp, (value) => { ... }) function

Changed

  • @extend decorator now can be combined with @computed decorator

Removed

  • @subscribe decorator
  • @reaction decorator

Native ko.computed with side effects can be used in all places where we use @reaction or @observer decorator.

In v0.7.1 and earlier @subscribe decorator can be used only with @observable but not with @computed. To avoid this restriction we can create ko.pureComputed and subscribe to it:

class ViewModel {
  @computed get computedProp() { ... }

  constructor() {
    ko.pureComputed(() => this.computedProp).subscribe((value) => { ... });
  }
}

So from v0.8.0 instead of @subscribe decorator there is shorthand function subscribe with some extra functionality like "subscribe once":

class ViewModel {
  @computed get computedProp() { ... }

  constructor() {
    subscribe(() => this.computedProp, (value) => { ... });
  }
}
gnaeus
published 0.7.1 •

Changelog

Source

[0.7.1] - 2017-01-22

Changed

  • Renamed @observer decorator to @reaction
gnaeus
published 0.7.0 •

gnaeus
published 0.6.0 •

Changelog

Source

[0.6.0] - 2016-12-11

Added

  • unwrap(this, "observablePropName") function for getting internal observable (see #1)
gnaeus
published 0.5.0 •

Changelog

Source

[0.5.0] - 2016-12-10

Changed

  • Upgraded TypeScript dependency to v2
  • Upgraded Type Definitions
gnaeus
published 0.4.2 •

Changelog

Source

[0.4.2] - 2016-10-05

Added

  • @observable decorator
  • @observableArray decorator
  • @computed decorator
  • @observer decorator
  • @extend decorator
  • @subscribe decorator
  • @component decorator
gnaeus
published 0.4.1 •

gnaeus
published 0.4.0 •

gnaeus
published 0.3.0 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc