npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sodiumjs

v3.0.7

Published

A Functional Reactive Programming (FRP) library for JavaScript

Downloads

39

Readme

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.