Skip to content

Instantly share code, notes, and snippets.

View indexzero's full-sized avatar
🗽
✊ Fist in the air in the land of hypocrisy

Charlie Robbins indexzero

🗽
✊ Fist in the air in the land of hypocrisy
View GitHub Profile
var a = {
x: 1
};
var props = {
x: { value: 1 }
};
var b = Object.create(a);
var c = Object.create(a,b);
var html = "<div><hr>foo<div>bar</div></div>";
var c = -1;
html = html.replace(/\<([^<\>]*)\>/g, function(str, r) {
if(r.indexOf("/") === -1) {
c++;
return "[\"" + r + ((c == 0) ? "\"," : "\"],");