Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitry Prokashev asvd

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

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

View globals-vs-export.md

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