Skip to content

Commit

Permalink
add marti demo of object tree mix b00tc4mp#51
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbarzi committed May 30, 2024
1 parent a212a18 commit a9c2a14
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
20 changes: 20 additions & 0 deletions stuff/js/object-tree-mix.1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var o = {
a: 1, b: 2, c: 3, d: [
6,
{
g: 9,
h: function () {
return [10, [12, { i: 15, j: { k: [16, 17, function () { return 18 }] } }, 13, 14], 11]
}
},
7,
8
], e: 4, f: 5
}

var a = [
o.a, o.b, o.c, o.e, o.f, o.d[0], o.d[2], o.d[3], o.d[1].g, o.d[1].h()[0], o.d[1].h()[2], o.d[1].h()[1][0], o.d[1].h()[1][2], o.d[1].h()[1][3], o.d[1].h()[1][1].i, o.d[1].h()[1][1].j.k[0], o.d[1].h()[1][1].j.k[1], o.d[1].h()[1][1].j.k[2]()
]

// a
// (18)[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
24 changes: 6 additions & 18 deletions stuff/js/object-tree-mix.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
var o = {
a: 1, b: 2, c: 3, d: [
6,
{
g: 9,
h: function () {
return [10, [12, { i: 15, j: { k: [16, 17, function () { return 18 }] } }, 13, 14], 11]
}
},
7,
8
], e: 4, f: 5
}
var a = [1, 2, 5, 9, 3, 6,
{ a: 4, b: 7, c: function () { return [15, 17, 19] }, d: [8, 10, 11] },
12, 13, 14,
function () { return { a: 16, b: 18, c: 20 } }]

var a = [
o.a, o.b, o.c, o.e, o.f, o.d[0], o.d[2], o.d[3], o.d[1].g, o.d[1].h()[0], o.d[1].h()[2], o.d[1].h()[1][0], o.d[1].h()[1][2], o.d[1].h()[1][3], o.d[1].h()[1][1].i, o.d[1].h()[1][1].j.k[0], o.d[1].h()[1][1].j.k[1], o.d[1].h()[1][1].j.k[2]()
]
var a2 = [a[0], a[1], a[4], a[6].a, a[2], a[5], a[6].b, a[6].d[0], a[3], a[6].d[1], a[6].d[2], a[7], a[8], a[9], a[6].c()[0], a[10]().a, a[6].c()[1], a[10]().b, a[6].c()[2], a[10]().c]

// a
// (18)[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
var a3 = [a['0'], a['1'], a['4'], a['6']['a'], a['2'], a['5'], a['6']['b'], a['6']['d']['0'], a['3'], a['6']['d']['1'], a['6']['d']['2'], a['7'], a['8'], a['9'], a['6']['c']()['0'], a['10']()['a'], a['6']['c']()['1'], a['10']()['b'], a['6']['c']()['2'], a['10']()['c']]

0 comments on commit a9c2a14

Please sign in to comment.