1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | var L = require("./index");
|
5 | var listStyle = {
|
6 | style: "list-style-type: none; padding: 0; margin: 0 0 0 22px; font-style: normal"
|
7 | };
|
8 | var gw = typeof window === undefined ? global : window;
|
9 | if (gw.devtoolsFormatters === undefined) {
|
10 | gw.devtoolsFormatters = [];
|
11 | }
|
12 | function createReference(object) {
|
13 | return ["object", { object: object }];
|
14 | }
|
15 | var l = L.list("hello", "world");
|
16 | L.intersperse(", ", l);
|
17 | gw.devtoolsFormatters.push({
|
18 | header: function (l) {
|
19 | if (L.isList(l)) {
|
20 | return ["div", { style: "font-style: italic" }, ["span", {}, "(" + l.length + ") list("]].concat(L.toArray(L.intersperse(", ", L.map(createReference, l))), [["span", {}, ")"]]);
|
21 | } else {
|
22 | return null;
|
23 | }
|
24 | },
|
25 | hasBody: function (l) {
|
26 | return l.length !== 0;
|
27 | },
|
28 | body: function (l) {
|
29 | var idx = 0;
|
30 | var children = L.map(function (o) {
|
31 | return ["li", ["span", {}, idx++ + ": "], createReference(o)];
|
32 | }, l);
|
33 | return ["ol", listStyle].concat(L.toArray(children));
|
34 | }
|
35 | }); |
\ | No newline at end of file |