</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="checkprop">checkProp</h4><p>Given a <code>predicate</code> function and a <code>prop</code> string, this curried function will then take an <code>object</code> to inspect by calling the property and passing it to the predicate.</p><p>Summon <code>prop</code> on <code>obj</code>, pass it to a provided <code>predicate</code> function and return a masked boolean.</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">checkProp</span><spanclass="token operator">=</span><spanclass="token punctuation">(</span>predicate<spanclass="token punctuation">,</span> prop<spanclass="token punctuation">)</span><spanclass="token operator">=></span> obj <spanclass="token operator">=> !!</span><spanclass="token function">predicate</span><spanclass="token punctuation">(</span>obj<spanclass="token punctuation">[</span>prop<spanclass="token punctuation">]);</span>
</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="checkprop">checkProp</h4><p>Given a <code>predicate</code> function and a <code>prop</code> string, this curried function will then take an <code>object</code> to inspect by calling the property and passing it to the predicate.</p><p>Summon <code>prop</code> on <code>obj</code>, pass it to a provided <code>predicate</code> function and return a masked boolean.</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">checkProp</span><spanclass="token operator">=</span><spanclass="token punctuation">(</span>predicate<spanclass="token punctuation">,</span> prop<spanclass="token punctuation">)</span><spanclass="token operator">=></span> obj <spanclass="token operator">=> !!</span><spanclass="token function">predicate</span><spanclass="token punctuation">(</span>obj<spanclass="token punctuation">[</span>prop<spanclass="token punctuation">]);</span>
</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="isnull">isNull</h4><p>Returns <code>true</code> if the specified value is <code>null</code>, <code>false</code> otherwise.</p><p>Use the strict equality operator to check if the value and of <code>val</code> are equal to <code>null</code>.</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">isNull</span><spanclass="token operator">=</span> val <spanclass="token operator">=></span> val <spanclass="token operator">===</span><spanclass="token keyword">null</span><spanclass="token punctuation">;</span>
</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="isnull">isNull</h4><p>Returns <code>true</code> if the specified value is <code>null</code>, <code>false</code> otherwise.</p><p>Use the strict equality operator to check if the value and of <code>val</code> are equal to <code>null</code>.</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">isNull</span><spanclass="token operator">=</span> val <spanclass="token operator">=></span> val <spanclass="token operator">===</span><spanclass="token keyword">null</span><spanclass="token punctuation">;</span>
</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="isnumber">isNumber</h4><p>Checks if the given argument is a number.</p><p>Use <code>typeof</code> to check if a value is classified as a number primitive.</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">isNumber</span><spanclass="token operator">=</span> val <spanclass="token operator">=></span><spanclass="token keyword">typeof</span> val <spanclass="token operator">===</span><spanclass="token string">'number'</span><spanclass="token punctuation">;</span>
</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="isnumber">isNumber</h4><p>Checks if the given argument is a number.</p><p>Use <code>typeof</code> to check if a value is classified as a number primitive. To safeguard against <code>NaN</code>, check if <code>val === val</code> (as <code>NaN</code> has a <code>typeof</code> equal to <code>number</code> and is the only value not equal to itself).</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">isNumber</span><spanclass="token operator">=</span> val <spanclass="token operator">=></span><spanclass="token keyword">typeof</span> val <spanclass="token operator">===</span><spanclass="token string">'number'</span><spanclass="token operator">&&</span> val <spanclass="token operator">===</span> val<spanclass="token punctuation">;</span>
</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="isobject">isObject</h4><p>Returns a boolean determining if the passed value is an object or not.</p><p>Uses the <code>Object</code> constructor to create an object wrapper for the given value. If the value is <code>null</code> or <code>undefined</code>, create and return an empty object. Οtherwise, return an object of a type that corresponds to the given value.</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">isObject</span><spanclass="token operator">=</span> obj <spanclass="token operator">=></span> obj <spanclass="token operator">===</span><spanclass="token function">Object</span><spanclass="token punctuation">(</span>obj<spanclass="token punctuation">);</span>
</pre></div><divclass="card code-card"><divclass="corner beginner"></div><divclass="section card-content"><h4id="isobject">isObject</h4><p>Returns a boolean determining if the passed value is an object or not.</p><p>Uses the <code>Object</code> constructor to create an object wrapper for the given value. If the value is <code>null</code> or <code>undefined</code>, create and return an empty object. Οtherwise, return an object of a type that corresponds to the given value.</p></div><divclass="copy-button-container"><buttonclass="copy-button"aria-label="Copy to clipboard"></button></div><preclass="section card-code language-js"><spanclass="token keyword">const</span><spanclass="token function-variable function">isObject</span><spanclass="token operator">=</span> obj <spanclass="token operator">=></span> obj <spanclass="token operator">===</span><spanclass="token function">Object</span><spanclass="token punctuation">(</span>obj<spanclass="token punctuation">);</span>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.