mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
added an isEmpty function that works on arrays and objects
This commit is contained in:
15
index.html
15
index.html
@@ -192,7 +192,8 @@ _(lyrics).chain()
|
||||
<b>Objects</b>
|
||||
<br />
|
||||
<span class="methods"><a href="#keys">keys</a>, <a href="#values">values</a>,
|
||||
<a href="#extend">extend</a>, <a href="#clone">clone</a>, <a href="#isEqual">isEqual</a>, <a href="#isElement">isElement</a>,
|
||||
<a href="#extend">extend</a>, <a href="#clone">clone</a>,
|
||||
<a href="#isEqual">isEqual</a>, <a href="#isEmpty">isEmpty</a>, <a href="#isElement">isElement</a>,
|
||||
<a href="#isArray">isArray</a>, <a href="#isFunction">isFunction</a>, <a href="#isUndefined">isUndefined</a>
|
||||
</span>
|
||||
</p>
|
||||
@@ -710,6 +711,18 @@ moe == clone;
|
||||
=> false
|
||||
_.isEqual(moe, clone);
|
||||
=> true
|
||||
</pre>
|
||||
|
||||
<p id="isEmpty">
|
||||
<b class="header">isEmpty</b><code>_.isEmpty(object)</code>
|
||||
<br />
|
||||
Returns <i>true</i> if <b>object</b> contains no values.
|
||||
</p>
|
||||
<pre>
|
||||
_.isEmpty([1, 2, 3]);
|
||||
=> false
|
||||
_.isEmpty({});
|
||||
=> true
|
||||
</pre>
|
||||
|
||||
<p id="isElement">
|
||||
|
||||
Reference in New Issue
Block a user