Skip to content

Releases: 92green/fronads

Either.toPromise()

18 Dec 22:43
Compare
Choose a tag to compare

Eithers can now be turned into to a promise.

Left(value).toPromise() -> Promise.reject(value);
Right(value).toPromise() -> Promise.resolve(value);

Better Either Generics

18 Dec 22:41
Compare
Choose a tag to compare

BREAKING:

Either now has types for left and right

// New
function(): Either<LeftType, RightType> {}

// Old
function(): Either<RightType> {}

PerhapsEither, Maybe.ap

18 Dec 22:39
Compare
Choose a tag to compare
v0.15.0

0.15.0

None() -> None

16 Nov 22:54
Compare
Choose a tag to compare

BREAKING: None is now a constant not a factory.

Remove RequestState

23 Oct 01:10
Compare
Choose a tag to compare

BREAKING: RequestState no longer exists. Create your own StateFunctor

Generic Types!

27 Sep 06:16
Compare
Choose a tag to compare

New

  • Generic flow types
const name: Maybe<string> = Some('steve');

// Will throw flow errors
name.flatMap(nn => Right(nn));
name.map(nn => 2);


// Will not throw flow errors
name.flatMap(nn => None());
name.map(nn => `${nn} is cool!`);

Deprecated

  • Maybe, Either, Identity exports are now just their classes/types. Their constructor functions have been moved to: MaybeFactory, EitherFactory, IdentityFactory.

Add .flow files

07 Sep 05:08
Compare
Choose a tag to compare
v0.11.0

0.11.0

Add Task monad

07 Sep 05:10
Compare
Choose a tag to compare

Task lets you create a description of an action that is resolved via a callback.
It is useful for asynchronous operations. It can be thought of as a stricter more monadic version of a promise.

Compare StateFunctors

07 Sep 05:13
Compare
Choose a tag to compare
  • Add equals method to the StateFunctor.
  • Don't allow Nones to filter.

Filters & toLeft & toRight

07 Sep 05:14
Compare
Choose a tag to compare
  • Add filter methods to Maybe and Either.
  • Add toLeft and toRight methods to Either.