All Projects → SodiumFRP → Sodium Typescript

SodiumFRP / Sodium Typescript

Typescript/Javascript implementation of Sodium FRP (Functional Reactive Programming) library

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Sodium Typescript

Ulmus
A functional-reactive style programming library for Clojure(script)
Stars: ✭ 33 (-67.65%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Ios Oss
Kickstarter for iOS. Bring new ideas to life, anywhere.
Stars: ✭ 7,840 (+7586.27%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Fpgo
Monad, Functional Programming features for Golang
Stars: ✭ 165 (+61.76%)
Mutual labels:  reactive, functional-reactive-programming, functional-programming
Kickstarter Reactiveextensions
A collection of extensions to the ReactiveSwift framework.
Stars: ✭ 183 (+79.41%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Mobx Keystone
A MobX powered state management solution based on data trees with first class support for Typescript, support for snapshots, patches and much more
Stars: ✭ 284 (+178.43%)
Mutual labels:  reactive, frp, functional-reactive-programming
Reflex
Interactive programs without callbacks or side-effects. Functional Reactive Programming (FRP) uses composable events and time-varying values to describe interactive systems as pure functions. Just like other pure functional code, functional reactive code is easier to get right on the first try, maintain, and reuse.
Stars: ✭ 910 (+792.16%)
Mutual labels:  reactive, frp, functional-reactive-programming
Android Oss
Kickstarter for Android. Bring new ideas to life, anywhere.
Stars: ✭ 5,627 (+5416.67%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Kefir
A Reactive Programming library for JavaScript
Stars: ✭ 1,769 (+1634.31%)
Mutual labels:  reactive, frp, functional-programming
reflex-dom-ace
Reflex wrapper for the ACE editor
Stars: ✭ 12 (-88.24%)
Mutual labels:  reactive, functional-reactive-programming, frp
reflex-dom-semui
A reflex-dom API for Semantic UI components
Stars: ✭ 22 (-78.43%)
Mutual labels:  reactive, functional-reactive-programming, frp
Dunai
Classic and Arrowized Functional Reactive Programming, Reactive Programming, and Stream programming, all via Monadic Stream Functions
Stars: ✭ 115 (+12.75%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Reflex Dom
Web applications without callbacks or side-effects. Reflex-DOM brings the power of functional reactive programming (FRP) to the web. Build HTML and other Document Object Model (DOM) data with a pure functional interface.
Stars: ✭ 301 (+195.1%)
Mutual labels:  reactive, frp, functional-reactive-programming
reflex-native
Framework for writing fully native apps using Reflex, a Functional Reactive Programming library for Haskell.
Stars: ✭ 40 (-60.78%)
Mutual labels:  reactive, functional-reactive-programming, frp
purescript-pop
😃 A functional reactive programming (FRP) demo created with PureScript events and behaviors.
Stars: ✭ 33 (-67.65%)
Mutual labels:  reactive, functional-reactive-programming, frp
Hareactive
Purely functional reactive programming library
Stars: ✭ 293 (+187.25%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Reflex Platform
A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
Stars: ✭ 602 (+490.2%)
Mutual labels:  reactive, frp, functional-reactive-programming
Redux Cycles
Bring functional reactive programming to Redux using Cycle.js
Stars: ✭ 755 (+640.2%)
Mutual labels:  reactive, functional-reactive-programming
Rxcombine
Bi-directional type bridging between RxSwift and Apple's Combine framework
Stars: ✭ 741 (+626.47%)
Mutual labels:  reactive, frp
Cycle State Machine Demo
Non-trivial, real use case demo of a hierarchical state machine library with cyclejs
Stars: ✭ 25 (-75.49%)
Mutual labels:  functional-reactive-programming, functional-programming
Lambda
Functional patterns for Java
Stars: ✭ 737 (+622.55%)
Mutual labels:  lambda, functional-programming

Build Status npm version Bower version Downloads

Sodium

A Functional Reactive Programming (FRP) library for TypeScript/JavaScript

Examples

Here are some demos from the community you can try in your browser:

Prerequisite: Node.js

Install Node.js® and npm if they are not already on your machine.

Installation

via NPM

$> npm install sodiumjs
$> npm install -g sodiumjs

via Yarn

$> yarn add sodiumjs
$> yarn global add sodiumjs

via html include

<script src="https://cdn.jsdelivr.net/npm/sodiumjs/dist/sodium.umd.min.js"></script>

this requires also including sanctuary-type-classes and typescript-collections dependencies

How to use

Import

import { Cell } from 'sodiumjs';

ES6

const c = new Cell(12);

TypeScript

const c = new Cell<number>(12);

In a browser

<script>
    var cell = new Sodium.Cell(12);
</script>

Development

The usual npm run build/test/clean commands are available to produce the distribution package.

However, a more comfortable iteration style may be using the the live integration testing approach:

  1. cd src/tests/integration
  2. npm run dev:auto-reload (or just npm run dev without live reloading)

This starts up a local development server and showcases integration with a webpack app.

Changes to the core lib are then seen live since it uses a local alias rather than reference the lastest build or distribution of the library

Sodium library code is in src/lib

Packaging/tree-shaking and bundling of the library is done with Rollup

Testing is via Jest

License

Distributed under BSD 3-Clause

Announcement

Stephen Blackheath, 9 Jul 2016

I am very happy to announce that the Typescript implementation of Sodium is ready!

It features a newly developed scheme for memory management, which was needed because Javascript has no finalizers. Memory management in Sodium is 100% automatic.

This scheme imposes one small requirement on the API: You must declare any Sodium objects held inside closures using wrapper functions lambda1, lambda2 .. lambda6 - depending on the number of arguments that the closure has. These take a second argument, which is a list of the Sodium objects contained in the context of the closure. For example:

csw = csw_str.map(lambda1(sw => sw == "sa" ? sa : sb, [sa, sb])),

This allows Sodium to track all dependencies. There are some limitations to this scheme - for example, it can't track dependencies if you poke arbitrary Sodium objects into a StreamSink, but I think these should not affect any normal usages. Time will tell.

CHANGELOG

1.0.5 Migrate build environment over to fuse-box. Begin adding fantasy-land compatibility

1.0.0 Add snapshot3(), snapshot4(), snapshot5() and snapshot6(). Fix a serious bug in TimerSystem where timers sometimes don't fire.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].