Skip to content

Commit

Permalink
Update syntax blocks for Symbol and Weak objects (#4670)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elchi3 authored May 4, 2021
1 parent 5a860a9 commit 47720e1
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">Symbol([<var>description</var>])</pre>
<pre class="brush: js">
Symbol()
Symbol(description)
</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><var>Symbol</var>.toSource()

var sym = Symbol()
sym.toSource()</pre>
<pre class="brush: js">toSource()</pre>

<h3 id="Return_value">Return value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">Symbol().toString()</pre>
<pre class="brush: js">toString()</pre>

<h3 id="Return_value">Return value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">Symbol().valueOf()
</pre>
<pre class="brush: js">valueOf()</pre>

<h3 id="Return_value">Return value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><em>wm</em>.clear();</pre>
<pre class="brush: js">clear()</pre>

<h2 id="Examples">Examples</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><var>wm</var>.delete(<var>key</var>);</pre>
<pre class="brush: js">delete(key)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><var>wm</var>.get(<var>key</var>);</pre>
<pre class="brush: js">get(key)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><var>ws</var>.has(<var>key</var>);</pre>
<pre class="brush: js">has(key)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js"><var>wm</var>.set(<var>key</var>, <var>value</var>);</pre>
class="brush: js">set(key, value)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">new WeakMap([<var>iterable</var>])</pre>
<pre class="brush: js">
new WeakMap()
new WeakMap(iterable)
</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><code><var>obj</var> = <var>ref</var>.deref();</code>
</pre>
<pre class="brush: js">deref()</pre>

<h3 id="Return_value">Return value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><code><em>ws</em>.add(value);</code>
<pre class="brush: js">add(value)</code>
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><var>ws</var>.delete(<var>value</var>);</pre>
<pre class="brush: js">delete(value)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><var>ws</var>.has(<var>value</var>);</pre>
<pre class="brush: js">has(value)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">new WeakSet([<var>iterable</var>]);</pre>
<pre class="brush: js">
new WeakSet()
new WeakSet(iterable)
</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down

0 comments on commit 47720e1

Please sign in to comment.