tcomb-kfr

0.0.0 • Public • Published

tcomb-kfr

tcomb type definitions and combinators for kefir frp library.

Installation

npm install tcomb-kfr

Usage

T = require 'tcomb-kfr'
K = require 'kefir'

User = T.struct
  name: T.String
  email: T.String
, 'User'

Selector = T.func [User], T.Any, 'Selector'

select = T.func [T.obs(User), Selector], T.prop(T.Any), 'select'
.of (obs, selector) ->
  obs.map(selector).skipDuplicates().toProperty()

userProp = K.constant User name: 'nl0', email: 'nl0@example.com'
nameProp = select uProp, ({name}) -> name

API

The following types

  • Observable
  • Stream
  • Property

and combinators

  • observable(type) (aliased as obs)
  • stream(type)
  • property(type) (aliased as prop)

have been added to the tcomb namespace.

Readme

Keywords

Package Sidebar

Install

npm i tcomb-kfr

Weekly Downloads

0

Version

0.0.0

License

ISC

Last publish

Collaborators

  • nl