News for hackers. Stuff that matters.
Re:Show HN: Cell.js – A Self-constructing web app framework by meekaaku on Sunday June 11, 2017 @09:13PM (#14534700)
Ok. I found a way using factory:

  ItemMaker = function(data){
    return {
    $cell: true,
    $type: "h1",
    style: "font-size: 100px;",
    $text: data,
  
    }
  }
  var i1 = ItemMaker('foo');
  var i2 = ItemMaker('bar')

There are no comments on this comment yet.