function duplicate(_) { return JSON.parse(JSON.stringify(_)); } function extend(_) { for (var x, k, i=1, len=arguments.length; i