Skip to content

Instantly share code, notes, and snippets.

View asvd's full-sized avatar

Dmitry Prokashev asvd

View GitHub Profile
@asvd
asvd / RPC for jailed JS.md
Last active August 29, 2015 14:05
Remote Procedure Call for the jailed JavaScript

Remote Procedure Call for the jailed JavaScript

UPD: just released a library implementing all the features described below: https://github.com/asvd/jailed

When there is a need to run an untrusted code in JavaScript, one may jail it within a web-worker. But what makes it secure, also makes it restricted. One may only send messages and transfer json-serialized

Why declaring globals is better than exporting

The module pattern

During the past several years the way of managing JavaScript dependencies evolved bringing some advanced solutions. One of the concepts which became very popular today, is a module pattern. The beginning of [this