
//only exports browser api. use chloride module
//to get automatic fallbacks!

//load tweetnacl first, so that it works sync, and everything is there.
var exports = require('sodium-browserify-tweetnacl')

for(var k in exports) (function (fn, k) {
  if('function' == typeof fn)
    module.exports[k] = function () {
      return fn.apply(this, [].slice.call(arguments))
    }
})(exports[k], k)

//now load wasm which has to be async, ugh.
var libsodium = require('libsodium-wrappers')
libsodium.ready.then(function (value, what) {
  require('./browser') (libsodium, exports)
}).catch(function (err) {
  //escape from promise land, ugh
  setTimeout(function () {
    console.log(err.stack)
    process.exit(1)
  })
})









@@ -236,12 +236,8 @@
 on (
-fn, 
 k) %7B
@@ -263,18 +263,26 @@
  typeof 
-fn
+exports%5Bk%5D
 )%0A    mo
@@ -330,10 +330,18 @@
 urn 
-fn
+exports%5Bk%5D
 .app
@@ -388,20 +388,8 @@
 %0A%7D)(
-exports%5Bk%5D, 
 k)%0A%0A

check by key, instead of holding a reference, because the point is that the reference can be updated!