Simple encode and decode layer for Node.js