mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
2508 lines
50 KiB
Plaintext
2508 lines
50 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`--config 1`] = `
|
|
"<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8' />
|
|
<title>documentation | Documentation</title>
|
|
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
|
<link href='assets/bass.css' type='text/css' rel='stylesheet' />
|
|
<link href='assets/style.css' type='text/css' rel='stylesheet' />
|
|
<link href='assets/github.css' type='text/css' rel='stylesheet' />
|
|
<link href='assets/split.css' type='text/css' rel='stylesheet' />
|
|
<meta name='description' content='a documentation generator'>
|
|
</head>
|
|
<body class='documentation m0'>
|
|
<div class='flex'>
|
|
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
|
|
<div class='py1 px2'>
|
|
<h3 class='mb0 no-anchor'>documentation</h3>
|
|
<div class='mb1'><code></code></div>
|
|
<input
|
|
placeholder='Filter'
|
|
id='filter-input'
|
|
class='col12 block input'
|
|
type='text' />
|
|
<div id='toc'>
|
|
<ul class='list-reset h5 py1-ul'>
|
|
|
|
|
|
<li><a
|
|
href='#highlighted-section'
|
|
class=\\"h5 bold black caps\\">
|
|
Highlighted section
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#klass'
|
|
class=\\" toggle-sibling\\">
|
|
Klass
|
|
<span class='icon'>▸</span>
|
|
</a>
|
|
|
|
<div class='toggle-target display-none'>
|
|
|
|
<ul class='list-reset py1-ul pl1'>
|
|
<li class='h5'><span>Static members</span></li>
|
|
|
|
<li><a
|
|
href='#klassisclass'
|
|
class='regular pre-open'>
|
|
.isClass
|
|
</a></li>
|
|
|
|
<li><a
|
|
href='#klassisweird'
|
|
class='regular pre-open'>
|
|
.isWeird
|
|
</a></li>
|
|
|
|
<li><a
|
|
href='#klassisbuffer'
|
|
class='regular pre-open'>
|
|
.isBuffer
|
|
</a></li>
|
|
|
|
<li><a
|
|
href='#klassisarrayofbuffers'
|
|
class='regular pre-open'>
|
|
.isArrayOfBuffers
|
|
</a></li>
|
|
|
|
<li><a
|
|
href='#klassmagic_number'
|
|
class='regular pre-open'>
|
|
.MAGIC_NUMBER
|
|
</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
<ul class='list-reset py1-ul pl1'>
|
|
<li class='h5'><span>Instance members</span></li>
|
|
|
|
<li><a
|
|
href='#klassgetfoo'
|
|
class='regular pre-open'>
|
|
#getFoo
|
|
</a></li>
|
|
|
|
<li><a
|
|
href='#klasswithoptions'
|
|
class='regular pre-open'>
|
|
#withOptions
|
|
</a></li>
|
|
|
|
<li><a
|
|
href='#klasswithdeepoptions'
|
|
class='regular pre-open'>
|
|
#withDeepOptions
|
|
</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul class='list-reset py1-ul pl1'>
|
|
<li class='h5'>Events</li>
|
|
|
|
<li><a
|
|
href='#klasseventevent'
|
|
class='regular pre-open'>
|
|
ⓔ event
|
|
</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#customerror'
|
|
class=\\"\\">
|
|
CustomError
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#bar'
|
|
class=\\"\\">
|
|
bar
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#bar'
|
|
class=\\"\\">
|
|
bar
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#bar'
|
|
class=\\"\\">
|
|
bar
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#foo'
|
|
class=\\" toggle-sibling\\">
|
|
Foo
|
|
<span class='icon'>▸</span>
|
|
</a>
|
|
|
|
<div class='toggle-target display-none'>
|
|
|
|
|
|
<ul class='list-reset py1-ul pl1'>
|
|
<li class='h5'><span>Instance members</span></li>
|
|
|
|
<li><a
|
|
href='#foobar'
|
|
class='regular pre-open'>
|
|
#bar
|
|
</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#customstreams'
|
|
class=\\" toggle-sibling\\">
|
|
customStreams
|
|
<span class='icon'>▸</span>
|
|
</a>
|
|
|
|
<div class='toggle-target display-none'>
|
|
|
|
<ul class='list-reset py1-ul pl1'>
|
|
<li class='h5'><span>Static members</span></li>
|
|
|
|
<li><a
|
|
href='#customstreamspassthrough'
|
|
class='regular pre-open'>
|
|
.passthrough
|
|
</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
<div class='mt1 h6 quiet'>
|
|
<a href='https://documentation.js.org/reading-documentation.html'>Need help reading this?</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id='split-right' class='relative overflow-auto height-viewport-100'>
|
|
|
|
|
|
<div class='keyline-top-not py2'>
|
|
<section class='py2 clearfix'>
|
|
|
|
<h2 id='highlighted-section' class='mt0'>
|
|
Highlighted section
|
|
</h2>
|
|
|
|
|
|
<p>The public key is a base64 encoded string of a protobuf containing an RSA DER
|
|
buffer. This uses a node buffer to pass the base64 encoded public key protobuf
|
|
to the multihash for ID generation.</p>
|
|
<pre class='hljs'><span class=\\"hljs-keyword\\">var</span> PeerId = <span class=\\"hljs-built_in\\">require</span>(<span class=\\"hljs-string\\">'peer-id'</span>)
|
|
|
|
PeerId.create({ <span class=\\"hljs-attr\\">bits</span>: <span class=\\"hljs-number\\">1024</span> }, (err, id) => {
|
|
<span class=\\"hljs-built_in\\">console</span>.log(<span class=\\"hljs-built_in\\">JSON</span>.stringify(id.toJSON(), <span class=\\"hljs-literal\\">null</span>, <span class=\\"hljs-number\\">2</span>)
|
|
})</pre>
|
|
<pre><code>{
|
|
\\"id\\": \\"Qma9T5YraSnpRDZqRR4krcSJabThc8nwZuJV3LercPHufi\\",
|
|
\\"privKey\\": \\"CAAS4AQwggJcAgEAAoGBAMBgbIqyOL26oV3nGPBYrdpbv..\\",
|
|
\\"pubKey\\": \\"CAASogEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMBgbIqyOL26oV3nGPBYrdpbvzCY...\\"
|
|
}
|
|
</code></pre>
|
|
|
|
|
|
</section>
|
|
</div>
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='highlighted-section'>
|
|
Highlighted section
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>The public key is a base64 encoded string of a protobuf containing an RSA DER
|
|
buffer. This uses a node buffer to pass the base64 encoded public key protobuf
|
|
to the multihash for ID generation.</p>
|
|
<pre class='hljs'><span class=\\"hljs-keyword\\">var</span> PeerId = <span class=\\"hljs-built_in\\">require</span>(<span class=\\"hljs-string\\">'peer-id'</span>)
|
|
|
|
PeerId.create({ <span class=\\"hljs-attr\\">bits</span>: <span class=\\"hljs-number\\">1024</span> }, (err, id) => {
|
|
<span class=\\"hljs-built_in\\">console</span>.log(<span class=\\"hljs-built_in\\">JSON</span>.stringify(id.toJSON(), <span class=\\"hljs-literal\\">null</span>, <span class=\\"hljs-number\\">2</span>)
|
|
})</pre>
|
|
<pre><code>{
|
|
\\"id\\": \\"Qma9T5YraSnpRDZqRR4krcSJabThc8nwZuJV3LercPHufi\\",
|
|
\\"privKey\\": \\"CAAS4AQwggJcAgEAAoGBAMBgbIqyOL26oV3nGPBYrdpbv..\\",
|
|
\\"pubKey\\": \\"CAASogEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMBgbIqyOL26oV3nGPBYrdpbvzCY...\\"
|
|
}
|
|
</code></pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='klass'>
|
|
Klass
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Creates a new Klass</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>new Klass(foo: any)</div>
|
|
|
|
|
|
|
|
<p>
|
|
Extends
|
|
|
|
<a href=\\"https://nodejs.org/api/stream.html#stream_class_stream_writable\\">Stream.Writable</a>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>foo</span> <code class='quiet'>(any)</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Static Members</div>
|
|
<div class=\\"clearfix\\">
|
|
|
|
<div class='border-bottom' id='klassisclass'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>isClass(other, also)</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>Decide whether an object is a Klass instance
|
|
This is a [klasssic]<a href=\\"#klass\\">Klass</a>
|
|
This is a [link to something that does not exist]<a href=\\"DoesNot\\">DoesNot</a></p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>isClass(other: <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">Object</a>, also: any): <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\">boolean</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>other</span> <code class='quiet'>(<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">Object</a>)</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>also</span> <code class='quiet'>(any)</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\">boolean</a></code>:
|
|
whether the other thing is a Klass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class='border-bottom' id='klassisweird'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>isWeird(other)</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>A function that triggers the case where the autolinker doesn't find
|
|
the referenced class type</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>isWeird(other: Weird): <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\">boolean</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>other</span> <code class='quiet'>(Weird)</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\">boolean</a></code>:
|
|
whether the other thing is a Klass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class='border-bottom' id='klassisbuffer'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>isBuffer(buf, size)</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>This method takes a Buffer object that will be linked to nodejs.org</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>isBuffer(buf: (<a href=\\"https://nodejs.org/api/buffer.html\\">Buffer</a> | <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\\">string</a>), size: <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a>): <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\">boolean</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>buf</span> <code class='quiet'>((<a href=\\"https://nodejs.org/api/buffer.html\\">Buffer</a> | <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\\">string</a>))</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>size</span> <code class='quiet'>(<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a>
|
|
= <code>0</code>)</code>
|
|
size
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\">boolean</a></code>:
|
|
whether the other thing is a Klass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class='border-bottom' id='klassisarrayofbuffers'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>isArrayOfBuffers(buffers)</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>This method takes an array of buffers and counts them</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>isArrayOfBuffers(buffers: <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array\\">Array</a><<a href=\\"https://nodejs.org/api/buffer.html\\">Buffer</a>>): <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>buffers</span> <code class='quiet'>(<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array\\">Array</a><<a href=\\"https://nodejs.org/api/buffer.html\\">Buffer</a>>)</code>
|
|
some buffers
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a></code>:
|
|
how many
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Example</div>
|
|
|
|
|
|
<pre class='p1 overflow-auto round fill-light'><span class=\\"hljs-keyword\\">var</span> k = <span class=\\"hljs-keyword\\">new</span> Klass();
|
|
k.isArrayOfBuffers();</pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class='border-bottom' id='klassmagic_number'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>MAGIC_NUMBER</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>A magic number that identifies this Klass.</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>MAGIC_NUMBER</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Instance Members</div>
|
|
<div class=\\"clearfix\\">
|
|
|
|
<div class='border-bottom' id='klassgetfoo'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>getFoo()</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>Get this Klass's foo</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>getFoo(): <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">Number</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">Number</a></code>:
|
|
foo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Example</div>
|
|
|
|
<p><p>this shows you how to getFoo</p>
|
|
</p>
|
|
<pre class='p1 overflow-auto round fill-light'><span class=\\"hljs-keyword\\">var</span> x = foo.getFoo();</pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class='border-bottom' id='klasswithoptions'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>withOptions(options, otherOptions)</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>A function with an options parameter</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>withOptions(options: <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">Object</a>, otherOptions: <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a>?)</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>options</span> <code class='quiet'>(<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">Object</a>)</code>
|
|
|
|
</div>
|
|
|
|
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
<colgroup>
|
|
<col width='30%' />
|
|
<col width='70%' />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class='bold fill-light'>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class='mt1'>
|
|
|
|
<tr>
|
|
<td class='break-word'><span class='code bold'>options.foo</span> <code class='quiet'><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\\">string</a></code>
|
|
</td>
|
|
<td class='break-word'><span></span></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<td class='break-word'><span class='code bold'>options.bar</span> <code class='quiet'><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a></code>
|
|
</td>
|
|
<td class='break-word'><span></span></td>
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>otherOptions</span> <code class='quiet'>(<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a>?)</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class='border-bottom' id='klasswithdeepoptions'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>withDeepOptions(options)</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>A function with a deep options parameter</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>withDeepOptions(options: <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">Object</a>)</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>options</span> <code class='quiet'>(<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">Object</a>)</code>
|
|
|
|
</div>
|
|
|
|
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
<colgroup>
|
|
<col width='30%' />
|
|
<col width='70%' />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class='bold fill-light'>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class='mt1'>
|
|
|
|
<tr>
|
|
<td class='break-word'><span class='code bold'>options.foo</span> <code class='quiet'><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\\">string</a></code>
|
|
</td>
|
|
<td class='break-word'><span></span></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<td class='break-word'><span class='code bold'>options.bar</span> <code class='quiet'><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">Object</a></code>
|
|
</td>
|
|
<td class='break-word'><span></span></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td class='break-word'><span class='code bold'>options.bar.buz</span> <code class='quiet'><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\\">string</a></code>
|
|
</td>
|
|
<td class='break-word'><span></span></td>
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Events</div>
|
|
<div class=\\"clearfix\\">
|
|
|
|
<div class='border-bottom' id='klasseventevent'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>event</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>Klass event</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>event</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='customerror'>
|
|
CustomError
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>a typedef with nested properties</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>CustomError</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Properties</div>
|
|
<div>
|
|
|
|
<div class='space-bottom0'>
|
|
<span class='code bold'>error</span> <code class='quiet'>(<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\\">object</a>)</code>
|
|
: An error
|
|
|
|
|
|
<ul>
|
|
|
|
<li><code>error.code</code> <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\\">string</a>
|
|
|
|
<p>The error's code</p>
|
|
</li>
|
|
|
|
<li><code>error.description</code> <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\\">string</a>
|
|
|
|
<p>The error's description</p>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='bar'>
|
|
bar
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Get an instance of <a href=\\"#klass\\">Klass</a>. Will make
|
|
a <a href=\\"#klass\\">klass instance multiword</a>,
|
|
like a <a href=\\"#klass\\">klass</a></p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>bar(): <a href=\\"#klass\\">Klass</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"#klass\\">Klass</a></code>:
|
|
that class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='bar'>
|
|
bar
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Rest property function</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>bar(toys: ...<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">Number</a>): <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined\\">undefined</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>toys</span> <code class='quiet'>(...<a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">Number</a>)</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined\\">undefined</a></code>:
|
|
nothing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='bar'>
|
|
bar
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Get an instance of <a href=\\"#klass\\">Klass</a>. Will make
|
|
a <a href=\\"#klass\\">klass instance multiword</a>,
|
|
like a <a href=\\"#klass\\">klass</a>. This needs a <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\\">number</a> input.</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>bar(): <a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined\\">undefined</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href=\\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined\\">undefined</a></code>:
|
|
nothing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='foo'>
|
|
Foo
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>This is Foo</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>new Foo()</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Instance Members</div>
|
|
<div class=\\"clearfix\\">
|
|
|
|
<div class='border-bottom' id='foobar'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>bar</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>This is bar</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>bar</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='customstreams'>
|
|
customStreams
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>I am the container of stream types</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>customStreams</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Static Members</div>
|
|
<div class=\\"clearfix\\">
|
|
|
|
<div class='border-bottom' id='customstreamspassthrough'>
|
|
<div class=\\"clearfix small pointer toggle-sibling\\">
|
|
<div class=\\"py1 contain\\">
|
|
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
<span class='code strong strong truncate'>new passthrough()</span>
|
|
</div>
|
|
</div>
|
|
<div class=\\"clearfix display-none toggle-target\\">
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
|
|
<p>I am a passthrough stream that belongs to customStreams</p>
|
|
|
|
|
|
|
|
<div class='pre p1 fill-light mt0'>new passthrough()</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<script src='assets/anchor.js'></script>
|
|
<script src='assets/split.js'></script>
|
|
<script src='assets/site.js'></script>
|
|
</body>
|
|
</html>
|
|
"
|
|
`;
|
|
|
|
exports[`accepts config file 1`] = `
|
|
Array [
|
|
Object {
|
|
"augments": Array [],
|
|
"context": Object {
|
|
"file": "[path]",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 2,
|
|
"line": 13,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 11,
|
|
},
|
|
},
|
|
},
|
|
"description": Object {
|
|
"children": Array [
|
|
Object {
|
|
"children": Array [
|
|
Object {
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 19,
|
|
"line": 1,
|
|
"offset": 18,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "text",
|
|
"value": "Bananas are yellow",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 19,
|
|
"line": 1,
|
|
"offset": 18,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "paragraph",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 19,
|
|
"line": 1,
|
|
"offset": 18,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"examples": Array [],
|
|
"kind": "function",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 3,
|
|
"line": 10,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 8,
|
|
},
|
|
},
|
|
"members": Object {
|
|
"events": Array [],
|
|
"global": Array [],
|
|
"inner": Array [],
|
|
"instance": Array [],
|
|
"static": Array [],
|
|
},
|
|
"name": "bananas",
|
|
"namespace": "bananas",
|
|
"params": Array [],
|
|
"path": Array [
|
|
Object {
|
|
"kind": "function",
|
|
"name": "bananas",
|
|
},
|
|
],
|
|
"properties": Array [],
|
|
"returns": Array [],
|
|
"sees": Array [],
|
|
"tags": Array [],
|
|
"throws": Array [],
|
|
"todos": Array [],
|
|
},
|
|
Object {
|
|
"augments": Array [],
|
|
"context": Object {
|
|
"file": "[path]",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 2,
|
|
"line": 20,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 18,
|
|
},
|
|
},
|
|
},
|
|
"description": Object {
|
|
"children": Array [
|
|
Object {
|
|
"children": Array [
|
|
Object {
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 20,
|
|
"line": 1,
|
|
"offset": 19,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "text",
|
|
"value": "Carrots are awesome",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 20,
|
|
"line": 1,
|
|
"offset": 19,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "paragraph",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 20,
|
|
"line": 1,
|
|
"offset": 19,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"examples": Array [],
|
|
"kind": "function",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 3,
|
|
"line": 17,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 15,
|
|
},
|
|
},
|
|
"members": Object {
|
|
"events": Array [],
|
|
"global": Array [],
|
|
"inner": Array [],
|
|
"instance": Array [],
|
|
"static": Array [],
|
|
},
|
|
"name": "carrots",
|
|
"namespace": "carrots",
|
|
"params": Array [],
|
|
"path": Array [
|
|
Object {
|
|
"kind": "function",
|
|
"name": "carrots",
|
|
},
|
|
],
|
|
"properties": Array [],
|
|
"returns": Array [],
|
|
"sees": Array [],
|
|
"tags": Array [],
|
|
"throws": Array [],
|
|
"todos": Array [],
|
|
},
|
|
Object {
|
|
"augments": Array [],
|
|
"context": Object {
|
|
"file": "[path]",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 2,
|
|
"line": 6,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 4,
|
|
},
|
|
},
|
|
},
|
|
"description": Object {
|
|
"children": Array [
|
|
Object {
|
|
"children": Array [
|
|
Object {
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 15,
|
|
"line": 1,
|
|
"offset": 14,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "text",
|
|
"value": "Apples are red",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 15,
|
|
"line": 1,
|
|
"offset": 14,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "paragraph",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 15,
|
|
"line": 1,
|
|
"offset": 14,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"examples": Array [],
|
|
"kind": "function",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 3,
|
|
"line": 3,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 1,
|
|
},
|
|
},
|
|
"members": Object {
|
|
"events": Array [],
|
|
"global": Array [],
|
|
"inner": Array [],
|
|
"instance": Array [],
|
|
"static": Array [],
|
|
},
|
|
"name": "apples",
|
|
"namespace": "apples",
|
|
"params": Array [],
|
|
"path": Array [
|
|
Object {
|
|
"kind": "function",
|
|
"name": "apples",
|
|
},
|
|
],
|
|
"properties": Array [],
|
|
"returns": Array [],
|
|
"sees": Array [],
|
|
"tags": Array [],
|
|
"throws": Array [],
|
|
"todos": Array [],
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`build --document-exported 1`] = `
|
|
"<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
|
|
### Table of Contents
|
|
|
|
- [z][1]
|
|
- [zMethod][2]
|
|
- [x][3]
|
|
- [Parameters][4]
|
|
- [Class][5]
|
|
- [Parameters][6]
|
|
- [classMethod][7]
|
|
- [classGetter][8]
|
|
- [classSetter][9]
|
|
- [Parameters][10]
|
|
- [staticMethod][11]
|
|
- [staticGetter][12]
|
|
- [staticSetter][13]
|
|
- [Parameters][14]
|
|
- [T5][15]
|
|
- [y2Default][16]
|
|
- [y4][17]
|
|
- [Parameters][18]
|
|
- [object][19]
|
|
- [method][20]
|
|
- [getter][21]
|
|
- [setter][22]
|
|
- [Parameters][23]
|
|
- [prop][24]
|
|
- [func][25]
|
|
- [f1][26]
|
|
- [f3][27]
|
|
- [T][28]
|
|
- [T2][29]
|
|
- [T4][30]
|
|
- [f4][31]
|
|
- [Parameters][32]
|
|
- [o1][33]
|
|
- [om1][34]
|
|
- [f5][35]
|
|
- [Parameters][36]
|
|
- [o2][37]
|
|
- [om2][38]
|
|
|
|
## z
|
|
|
|
### zMethod
|
|
|
|
## x
|
|
|
|
### Parameters
|
|
|
|
- \`yparam\`
|
|
|
|
## Class
|
|
|
|
### Parameters
|
|
|
|
- \`a\` **[string][39]**
|
|
|
|
### classMethod
|
|
|
|
### classGetter
|
|
|
|
### classSetter
|
|
|
|
#### Parameters
|
|
|
|
- \`v\`
|
|
|
|
### staticMethod
|
|
|
|
### staticGetter
|
|
|
|
### staticSetter
|
|
|
|
#### Parameters
|
|
|
|
- \`v\`
|
|
|
|
## T5
|
|
|
|
Type: [boolean][40]
|
|
|
|
## y2Default
|
|
|
|
## y4
|
|
|
|
Description of y3
|
|
|
|
### Parameters
|
|
|
|
- \`p\` **[number][41]**
|
|
|
|
Returns **void**
|
|
|
|
## object
|
|
|
|
### method
|
|
|
|
### getter
|
|
|
|
### setter
|
|
|
|
#### Parameters
|
|
|
|
- \`v\`
|
|
|
|
### prop
|
|
|
|
### func
|
|
|
|
## f1
|
|
|
|
## f3
|
|
|
|
## T
|
|
|
|
Type: [number][41]
|
|
|
|
## T2
|
|
|
|
Type: [string][39]
|
|
|
|
## T4
|
|
|
|
Type: [string][39]
|
|
|
|
## f4
|
|
|
|
### Parameters
|
|
|
|
- \`x\` **X**
|
|
|
|
## o1
|
|
|
|
### om1
|
|
|
|
## f5
|
|
|
|
f5 comment
|
|
|
|
### Parameters
|
|
|
|
- \`y\` **Y**
|
|
|
|
## o2
|
|
|
|
### om2
|
|
|
|
[1]: #z
|
|
|
|
[2]: #zmethod
|
|
|
|
[3]: #x
|
|
|
|
[4]: #parameters
|
|
|
|
[5]: #class
|
|
|
|
[6]: #parameters-1
|
|
|
|
[7]: #classmethod
|
|
|
|
[8]: #classgetter
|
|
|
|
[9]: #classsetter
|
|
|
|
[10]: #parameters-2
|
|
|
|
[11]: #staticmethod
|
|
|
|
[12]: #staticgetter
|
|
|
|
[13]: #staticsetter
|
|
|
|
[14]: #parameters-3
|
|
|
|
[15]: #t5
|
|
|
|
[16]: #y2default
|
|
|
|
[17]: #y4
|
|
|
|
[18]: #parameters-4
|
|
|
|
[19]: #object
|
|
|
|
[20]: #method
|
|
|
|
[21]: #getter
|
|
|
|
[22]: #setter
|
|
|
|
[23]: #parameters-5
|
|
|
|
[24]: #prop
|
|
|
|
[25]: #func
|
|
|
|
[26]: #f1
|
|
|
|
[27]: #f3
|
|
|
|
[28]: #t
|
|
|
|
[29]: #t2
|
|
|
|
[30]: #t4
|
|
|
|
[31]: #f4
|
|
|
|
[32]: #parameters-6
|
|
|
|
[33]: #o1
|
|
|
|
[34]: #om1
|
|
|
|
[35]: #f5
|
|
|
|
[36]: #parameters-7
|
|
|
|
[37]: #o2
|
|
|
|
[38]: #om2
|
|
|
|
[39]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
|
|
[40]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
|
|
[41]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
"
|
|
`;
|
|
|
|
exports[`lint command generates lint output 1`] = `""`;
|
|
|
|
exports[`should use browser resolve 1`] = `
|
|
Array [
|
|
Object {
|
|
"augments": Array [],
|
|
"context": Object {
|
|
"file": "[path]",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 2,
|
|
"line": 10,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 8,
|
|
},
|
|
},
|
|
},
|
|
"description": Object {
|
|
"children": Array [
|
|
Object {
|
|
"children": Array [
|
|
Object {
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "text",
|
|
"value": "test",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "paragraph",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"examples": Array [],
|
|
"kind": "function",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 3,
|
|
"line": 7,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 3,
|
|
},
|
|
},
|
|
"members": Object {
|
|
"events": Array [],
|
|
"global": Array [],
|
|
"inner": Array [],
|
|
"instance": Array [],
|
|
"static": Array [],
|
|
},
|
|
"name": "index",
|
|
"namespace": "index",
|
|
"params": Array [],
|
|
"path": Array [
|
|
Object {
|
|
"kind": "function",
|
|
"name": "index",
|
|
},
|
|
],
|
|
"properties": Array [],
|
|
"returns": Array [
|
|
Object {
|
|
"description": Object {
|
|
"children": Array [],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"title": "returns",
|
|
"type": Object {
|
|
"name": "string",
|
|
"type": "NameExpression",
|
|
},
|
|
},
|
|
],
|
|
"sees": Array [],
|
|
"tags": Array [
|
|
Object {
|
|
"description": null,
|
|
"lineNumber": 2,
|
|
"title": "returns",
|
|
"type": Object {
|
|
"name": "string",
|
|
"type": "NameExpression",
|
|
},
|
|
},
|
|
],
|
|
"throws": Array [],
|
|
"todos": Array [],
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`should use node resolve 1`] = `
|
|
Array [
|
|
Object {
|
|
"augments": Array [],
|
|
"context": Object {
|
|
"file": "[path]",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 2,
|
|
"line": 10,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 8,
|
|
},
|
|
},
|
|
},
|
|
"description": Object {
|
|
"children": Array [
|
|
Object {
|
|
"children": Array [
|
|
Object {
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "text",
|
|
"value": "test",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "paragraph",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"examples": Array [],
|
|
"kind": "function",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 3,
|
|
"line": 7,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 3,
|
|
},
|
|
},
|
|
"members": Object {
|
|
"events": Array [],
|
|
"global": Array [],
|
|
"inner": Array [],
|
|
"instance": Array [],
|
|
"static": Array [],
|
|
},
|
|
"name": "index",
|
|
"namespace": "index",
|
|
"params": Array [],
|
|
"path": Array [
|
|
Object {
|
|
"kind": "function",
|
|
"name": "index",
|
|
},
|
|
],
|
|
"properties": Array [],
|
|
"returns": Array [
|
|
Object {
|
|
"description": Object {
|
|
"children": Array [],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"title": "returns",
|
|
"type": Object {
|
|
"name": "string",
|
|
"type": "NameExpression",
|
|
},
|
|
},
|
|
],
|
|
"sees": Array [],
|
|
"tags": Array [
|
|
Object {
|
|
"description": null,
|
|
"lineNumber": 2,
|
|
"title": "returns",
|
|
"type": Object {
|
|
"name": "string",
|
|
"type": "NameExpression",
|
|
},
|
|
},
|
|
],
|
|
"throws": Array [],
|
|
"todos": Array [],
|
|
},
|
|
Object {
|
|
"augments": Array [],
|
|
"context": Object {
|
|
"file": "[path]",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 2,
|
|
"line": 8,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 6,
|
|
},
|
|
},
|
|
},
|
|
"description": Object {
|
|
"children": Array [
|
|
Object {
|
|
"children": Array [
|
|
Object {
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "text",
|
|
"value": "test",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"indent": Array [],
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "paragraph",
|
|
},
|
|
],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 5,
|
|
"line": 1,
|
|
"offset": 4,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"examples": Array [],
|
|
"kind": "function",
|
|
"loc": Object {
|
|
"end": Object {
|
|
"column": 3,
|
|
"line": 5,
|
|
},
|
|
"start": Object {
|
|
"column": 0,
|
|
"line": 1,
|
|
},
|
|
},
|
|
"members": Object {
|
|
"events": Array [],
|
|
"global": Array [],
|
|
"inner": Array [],
|
|
"instance": Array [],
|
|
"static": Array [],
|
|
},
|
|
"name": "node",
|
|
"namespace": "node",
|
|
"params": Array [],
|
|
"path": Array [
|
|
Object {
|
|
"kind": "function",
|
|
"name": "node",
|
|
},
|
|
],
|
|
"properties": Array [],
|
|
"returns": Array [
|
|
Object {
|
|
"description": Object {
|
|
"children": Array [],
|
|
"position": Object {
|
|
"end": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
"start": Object {
|
|
"column": 1,
|
|
"line": 1,
|
|
"offset": 0,
|
|
},
|
|
},
|
|
"type": "root",
|
|
},
|
|
"title": "returns",
|
|
"type": Object {
|
|
"name": "string",
|
|
"type": "NameExpression",
|
|
},
|
|
},
|
|
],
|
|
"sees": Array [],
|
|
"tags": Array [
|
|
Object {
|
|
"description": null,
|
|
"lineNumber": 2,
|
|
"title": "returns",
|
|
"type": Object {
|
|
"name": "string",
|
|
"type": "NameExpression",
|
|
},
|
|
},
|
|
],
|
|
"throws": Array [],
|
|
"todos": Array [],
|
|
},
|
|
]
|
|
`;
|