julienrf / faithful Edit

Lightweight Scala.js promise implementation that does not violate parametricity

Version Matrix


faithful: deserving trust ; keeping your promises or doing what you are supposed to do.

Minimalistic Scala.js promise/future implementation that does not violate parametricity.

Key features:

  • lightweight: 50 SLOC, about 2 kB of uncompressed JavaScript (that’s about 50 times smaller than depending on Scala’s Future),
  • efficient: 2 times faster than Scala’s Future and 5 times faster than JavaScript’s Promise,
  • parametric: you can safely implement Monad[faithful.Future],
  • reasonable: exceptions are not silently swallowed.


The following artifacts are published under the organization name org.julienrf:


This content is released under the MIT License.