Here are some demos from the community you can try in your browser:
Install Node.js® and npm if they are not already on your machine.
$> npm install sodiumjs$> npm install -g sodiumjs
$> yarn add sodiumjs$> yarn global add sodiumjs
via html include
How to use
const c = 12;
const c = <number>12;
In a browser
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:
npm run dev:auto-reload(or just
npm run devwithout 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
Distributed under BSD 3-Clause
Stephen Blackheath, 9 Jul 2016
I am very happy to announce that the Typescript implementation of Sodium is ready!
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.
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.