Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

derivable

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derivable - npm Package Versions

12

0.9.3

Diff

Changelog

Source

0.9.3

ds300
published 0.9.2 •

Changelog

Source

0.9.2

Use more conservative equality checks.

This library was using Ramda.js' equality function which does deep equality checking on ordinary javascript objects. That's all fine, except not when it sometimes throws up false positives! The newest version fixed that, but I don't feel comfortable using Ramda's stuff anymore.

Luckily, most of the time identity checks are all we need, and they're lovely and fast.

People can, of course, still inject their own equality junk if they need extra protection against redundant computation.

ds300
published 0.9.1 •

Changelog

Source

0.9.1

New Stuff:

  • adopt method for allowing reactors to become dependent without needing to be started in a reaction cycle. Should have been in 0.8.0.
ds300
published 0.9.0 •

Changelog

Source

0.9.0

BREAKING CHANGES:

  • some function renamed to mIfThenElse
  • Derivable#some method renamed to mThen

I know this is uglier, but is ultimately consistent with the following:

New Stuff:

  • Derivable#mDerive for nil-shortcutting derivations, e.g.

    atom(null).mDerive(x => x.toString()).get() simply returns null, doesn't throw an error. Think of it like the elvis operator in c#.

  • Derivable#mOr for nil-only 'or' semantics e.g.

    atom(false).mOr(5) === false while atom(false).or(5) === 5

  • Derivable#mAnd for nil-only 'and' semantics e.g.

    atom('').mAnd(5) === 5 while atom('').and(5) === ''

  • top level functions mDerive, mOr and mAnd for the above.

  • top level function lookup for performing ordinary javascript property lookup on derivables.

  • top level function destruct for destructuring derivables. <3 this function.

ds300
published 0.8.0 •

Changelog

Source

0.8.0

BREAKING CHANGES:

  • Reaction class renamed to Reactor
  • Derivable#reaction method renamed to Derivable#reactor

Other Changes

Reactors can now 'depend' on other reactors. That is, if Reactor A starts Reactor B (via the Reactor#start method), B is said to be dependent on A. If A is stopped, B will be also be stopped (but if A is started, B is not also started). More importantly, if A and B need to react to the same change, A is guaranteed to react before B. This lets reactors control each other's lifecycles without fear of race conditions.

Reactors now have a method Reactor#orphan which removes any dependency the reactor has.

A minor bug involving creating reactors within transactions was fixed.

ds300
published 0.7.1 •

Changelog

Source

0.7.1

Fix bug where parents were being traversed in the wrong order during reaction phases. This precluded true laziness in some cases.

ds300
published 0.7.0 •

Changelog

Source

0.7.0

Rename Havelock to DerivableJS

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