View proxy.js
const proxy = (target, handler) => {
handler = typeof handler === 'object' ?
Object.create(handler) : new handler;
return (handler.proxy = new Proxy(target, handler));
View Promise.listeners.js
(function (wm) {'use strict';
// original proposal via Oliver Dunk @oliverdunk_ via ES ML
// (c) Andrea Giammarchi - (ISC)
addListeners: {
configurable: true,
value: function addListeners(resolve, reject) {
var once = wm.get(this);
View proto-classic.js
const bench = {
stress: 10e2,
times: 5,
classical(copy, overwrite) {
this._prototype = false;
this._bootstrap(copy, overwrite);
prototypal(copy, overwrite) {
this._prototype = true;
this._bootstrap(copy, overwrite);

A list of screen shots for browsers capabilities

View custom-elements-shenanigans.html
<!doctype html>
class Logger extends HTMLElement {
connectedCallback() {
}> has ${
View mix.js
// now an npm package qith 100% code coverage:
// (c) Andrea Giammarchi, @WebReflection (ISC)
const mix = Super => ({
with: (...mixins) =>
(Class, Mixin) => {
Class = Mixin(Class);
if (!Mixin.hasOwnProperty(Symbol.hasInstance)) {
View fsb.js
#!/usr/bin/env gjs
// (c) Andrea Giammarchi - ISC
// define the Gtk version to use = '3.0';
((Gtk, Gdk, WebKit2) => {

The history of hyperHTML followed by lit-html

While many remember the epic hyperHTML: A Virtual DOM Alternative post I've published the 5th of March 2017, the first official implementation of the library was working as hyperHTML.bind(node) function for tagged literals the day before, and it's been in my experiments folder already for a little while.

The hilarious reaction from the skeptical community

At first glance people couldn't believe performance of the DBMonster demo shown in that article,

View JSON.js
if(JSON.stringify('\u2028').length<4)JSON.stringify=function(s,r,f){return function() {return s.apply(null,arguments).replace(r,f)}}(JSON.stringify,/\u2028|\u2029/g,function(c){return'\u2028'==c?'\\u2028':'\\u2029'});
View irc.js
#!/usr/bin/env node
require('fs').readFile(process.argv[2], (err, data) => {
if (err) return;
const content = data.toString().trim();
const re = /^\[(.+?)\]\s+<(.+?)>\s(.*)$/gm;
const chat = [];
let current = {};
while (match = re.exec(content)) {
if (match[2] !== {