]> git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/pretty-json/node_modules/jsonminify/TestDoc.html
Remove old logs
[rbdr/dotfiles] / atom / packages / pretty-json / node_modules / jsonminify / TestDoc.html
1 <section class="suite">
2 <h1>JSON.minify</h1>
3 <dl>
4 <dt>define</dt>
5 <dd><pre><code>JSON.minify.should.be.ok;</code></pre></dd>
6 <dt>in-memory string</dt>
7 <dd><pre><code>var json = '{&quot;key&quot;:&quot;value&quot;}';
8 var res = JSON.minify(json);
9 JSON.parse(res).key.should.equal('value');</code></pre></dd>
10 <dt>comment.json</dt>
11 <dd><pre><code>var json = fs.readFileSync(__dirname + '/comment.json', 'utf8');
12 var res = JSON.parse(JSON.minify(json));
13 res.foo.should.equal('bar');</code></pre></dd>
14 <dt>comment.json</dt>
15 <dd><pre><code>var json = fs.readFileSync(__dirname + '/plain.json', 'utf8');
16 var res = JSON.parse(JSON.minify(json));
17 res.foo.should.equal('bar');</code></pre></dd>
18 </dl>
19 </section>