Miscellaneous code snippets for Espruino