generated from tc39/template-for-proposals
-
Notifications
You must be signed in to change notification settings - Fork 3
/
spec.emu
48 lines (41 loc) · 1.77 KB
/
spec.emu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!doctype html>
<meta charset="utf8">
<link rel="stylesheet" href="./spec.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
<script src="./spec.js"></script>
<pre class="metadata">
title: Symbol Predicates
stage: 2
contributors:
- Jordan Harband
</pre>
<emu-clause id="sec-fundamental-objects" number="20">
<h1>Fundamental Objects</h1>
<emu-clause id="sec-symbol-objects" number="4">
<h1>Symbol Objects</h1>
<emu-clause id="sec-properties-of-the-symbol-constructor" number="2">
<h1>Properties of the Symbol Constructor</h1>
<emu-clause id="sec-symbol-isregisteredsymbol" number="5">
<h1>Symbol.isRegisteredSymbol ( _value_ )</h1>
<p>When the `isRegisteredSymbol` method is called with arguments _value_, the following steps are taken:</p>
<emu-alg>
1. Let _result_ be Completion(thisSymbolValue(_value_)).
1. If _result_ is an abrupt completion, return *false*.
1. Assert: Type(! _result_) is Symbol.
1. Return KeyForSymbol(! _result_) is String.
</emu-alg>
</emu-clause>
<emu-clause id="sec-symbol-iswellknownsymbol">
<h1>Symbol.isWellKnownSymbol ( _value_ )</h1>
<p>When the `isWellKnownSymbol` method is called with arguments _value_, the following steps are taken:</p>
<emu-alg>
1. Let _result_ be Completion(thisSymbolValue(_value_)).
1. If _result_ is an abrupt completion, return *false*.
1. Assert: Type(! _result_) is Symbol.
1. If ! _result_ is one of the values listed in <emu-xref href="#table-well-known-symbols"></emu-xref>, return *true*.
1. Return *false*.
</emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>