JavaScript notes


  • use FileReader API to handle files locally to client, i.e. without uploading to the server
  • atob() decodes from Base64; btoa() encodes in Base64
  • toFixed([Number]) formats floating point numbers e.g. 3.14.toFixed(3) => 3.140


  • to customize template output use function: template: function(obj) { return customizeOutput(obj);}
  • one can use column template to show any complex data, but there is no easy way to edit complex data structures in ui.datatable.
  • how to implement custom data type: