Travis build: 1200
This commit is contained in:
@ -3950,7 +3950,7 @@ functions(new Foo()); // ['a', 'b']
|
||||
<br>[⬆ Back to top](#table-of-contents)
|
||||
|
||||
|
||||
### functionName
|
||||
### functionsIn
|
||||
|
||||
Returns an array of function property names from own and inherited enumerable properties of object.
|
||||
|
||||
@ -5487,6 +5487,7 @@ const httpPost = (url, callback, data = null, err = console.error) => {
|
||||
|
||||
|
||||
|
||||
|
||||
const newPost = {
|
||||
"userId": 1,
|
||||
"id": 1337,
|
||||
|
||||
@ -855,7 +855,7 @@ console<span class="token punctuation">.</span><span class="token function">log<
|
||||
<span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">b</span> <span class="token operator">=</span> <span class="token punctuation">()</span> <span class="token operator">=></span> <span class="token number">2</span><span class="token punctuation">;
|
||||
}</span>
|
||||
<span class="token function">functions</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">Foo</span><span class="token punctuation">());</span> <span class="token comment">// ['a', 'b']</span>
|
||||
</pre><button class="primary clipboard-copy">📋 Copy to clipboard</button></div></div><div class="card fluid"><h3 id="functionsin" class="section double-padded">functionName</h3><div class="section double-padded"><p>Returns an array of function property names from own and inherited enumerable properties of object.</p><p>Use <code>Object.keys(obj)</code> and <code>Object.get.PrototypeOf(obj)</code> to iterate over the object's own and inherited properties, <code>Array.filter()</code> to keep only those that are functions. Use the spread operator (<code>...</code>) to combine all returned property names into one array.</p><pre class="language-js"><span class="token keyword">const</span> <span class="token function-variable function">functionsIn</span> <span class="token operator">=</span> obj <span class="token operator">=></span>
|
||||
</pre><button class="primary clipboard-copy">📋 Copy to clipboard</button></div></div><div class="card fluid"><h3 id="functionsin" class="section double-padded">functionsIn</h3><div class="section double-padded"><p>Returns an array of function property names from own and inherited enumerable properties of object.</p><p>Use <code>Object.keys(obj)</code> and <code>Object.get.PrototypeOf(obj)</code> to iterate over the object's own and inherited properties, <code>Array.filter()</code> to keep only those that are functions. Use the spread operator (<code>...</code>) to combine all returned property names into one array.</p><pre class="language-js"><span class="token keyword">const</span> <span class="token function-variable function">functionsIn</span> <span class="token operator">=</span> obj <span class="token operator">=></span>
|
||||
<span class="token punctuation">[</span><span class="token operator">...</span>Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>obj<span class="token punctuation">),</span> <span class="token operator">...</span>Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>Object<span class="token punctuation">.</span><span class="token function">getPrototypeOf</span><span class="token punctuation">(</span>obj<span class="token punctuation">))].</span><span class="token function">filter</span><span class="token punctuation">(</span>
|
||||
key <span class="token operator">=></span> <span class="token keyword">typeof</span> obj<span class="token punctuation">[</span>key<span class="token punctuation">]</span> <span class="token operator">===</span> <span class="token string">'function'</span>
|
||||
<span class="token punctuation">);</span>
|
||||
@ -1234,6 +1234,7 @@ Logs: {
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="token keyword">const</span> newPost <span class="token operator">=</span> <span class="token punctuation">{</span>
|
||||
<span class="token string">"userId"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
|
||||
<span class="token string">"id"</span><span class="token punctuation">:</span> <span class="token number">1337</span><span class="token punctuation">,</span>
|
||||
|
||||
@ -37,6 +37,7 @@ const httpPost = (url, callback, data = null, err = console.error) => {
|
||||
|
||||
|
||||
|
||||
|
||||
const newPost = {
|
||||
"userId": 1,
|
||||
"id": 1337,
|
||||
|
||||
Reference in New Issue
Block a user