Message from JavaScript talks

July 2017

— I would love to express that sequence some other way that's easier to edit


I need opinions on this syntax... specifically the format one:
HTML Page:

<template id ="myTemplate">
<div data-content-text="myTag" data-content-text-format="myFormater">
<div id="myContainer></div>

var loader = new cdaTemplate();
loader.addFormatter("myformatter", value => value.toUpperCase());
loader.loadTemplate("#myTemplate", "#myContainer", {
data: {
myTag: "Hello World"

<div id="myContainer">

— It's not a lot, but it looks messy

— Check the comments on JSLint

— I wound up scrapping the sequence diagram

— 5 paragraphs of text > that diagram

— I thought so, what do you think is a good way to notate it?

— ¯\_(ツ)_/¯

— Hm, I have a challenge


var curData =;

// Paginate the data

// FIXME: This is completely random as objects are unordered...

if (conf.paged) {

  if (!Array.isArray( {

  curData = Array.from(;


  var pages = Math.ceil(curData.length / conf.elemPerPage);

  if (conf.pageNo >= pages) {

    curData = curData.slice((conf.pageNo - 1) * conf.elemPerPage, conf.elemPerPage + start);



Message permanent page

— is not an Array here, and also that Array.from will not work on normal objects

— Of course, those were attempts to solve the problem in the FIXME there