Debian Codegraph @

TestDoc.html

raw
1 <section class="suite">
2 <h1>JSON.minify</h1>
3 <dl>
4 <dt>define</dt>
5 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
6 <dd><pre><code>JSON.minify.should.be.ok;</code></pre></dd>
7 <dt>in-memory string</dt>
8 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
9 <dd><pre><code>var json = &#x27;{&#x22;key&#x22;:&#x22;value&#x22;}&#x27;;
10 var res = JSON.minify(json);
11 JSON.parse(res).key.should.equal(&#x27;value&#x27;);</code></pre></dd>
12 <dt>comment.json</dt>
13 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
14 <dd><pre><code>var json = fs.readFileSync(__dirname + &#x27;/comment.json&#x27;, &#x27;utf8&#x27;);
15 var res = JSON.parse(JSON.minify(json));
16 res.foo.should.equal(&#x27;bar&#x27;);</code></pre></dd>
17 <dt>comment.json</dt>
18 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
19 <dd><pre><code>var json = fs.readFileSync(__dirname + &#x27;/plain.json&#x27;, &#x27;utf8&#x27;);
20 var res = JSON.parse(JSON.minify(json));
21 res.foo.should.equal(&#x27;bar&#x27;);</code></pre></dd>
22 <dt>in-memory string json.array plain</dt>
23 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
24 <dd><pre><code>var json = &#x27;[1,2,3]&#x27;;
25 var res = JSON.parse(JSON.minify(json));
26 res.length.should.equal(3);</code></pre></dd>
27 <dt>in-memory string json.array start line comment</dt>
28 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
29 <dd><pre><code>var json = &#x27;//[1,2,3]\n[4,5,6,7]&#x27;;
30 var res = JSON.parse(JSON.minify(json));
31 res.length.should.equal(4);
32 should(res[0]).be.exactly(4).and.be.a.Number();</code></pre></dd>
33 <dt>in-memory string json.array start multi comment</dt>
34 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
35 <dd><pre><code>var json = &#x27;/**[1,2,3]*/[8,9,10,11]&#x27;;
36 var res = JSON.parse(JSON.minify(json));
37 res.length.should.equal(4);
38 should(res[0]).be.exactly(8).and.be.a.Number();</code></pre></dd>
39 <dt>in-memory string json.array end line comment</dt>
40 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
41 <dd><pre><code>var json = &#x27;[4,5,6,7]//[1,2,3]&#x27;;
42 var res = JSON.parse(JSON.minify(json));
43 res.length.should.equal(4);
44 should(res[0]).be.exactly(4).and.be.a.Number();</code></pre></dd>
45 <dt>in-memory string json.array end multi comment</dt>
46 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
47 <dd><pre><code>var json = &#x27;[8,9,10,11]/**[1,2,3]*/&#x27;;
48 var res = JSON.parse(JSON.minify(json));
49 res.length.should.equal(4);
50 should(res[0]).be.exactly(8).and.be.a.Number();</code></pre></dd>
51 <dt>array_comment.json</dt>
52 <dt>/Users/a12057/scm/github.com/fkei/JSON.minify/test/test-minify.json.js</dt>
53 <dd><pre><code>var json = fs.readFileSync(__dirname + &#x27;/array_comment.json&#x27;, &#x27;utf8&#x27;);
54 var res = JSON.parse(JSON.minify(json));
55 should(res.length).be.exactly(3).and.be.a.Number();
56 should(res[0][&#x27;somethi&#x22;&#x22;ng&#x27;].length).be.exactly(4).and.be.a.Number();
57 should(res[0][&#x27;somethi&#x22;&#x22;ng&#x27;][3]).be.exactly(23).and.be.a.Number();</code></pre></dd>
58 </dl>
59 </section>