Skip to content

Commit 2bf123a

Browse files
committed
add: implement isEmpty
1 parent 714456e commit 2bf123a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/immutable_sequence.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555
return new ImmutableSequence(tree);
5656
};
5757

58+
/**
59+
* Check whether the sequence is empty.
60+
* @return {boolean}
61+
*/
62+
ImmutableSequence.prototype.isEmpty = function () {
63+
return this.tree_.isEmpty();
64+
};
65+
5866
/**
5967
* Get the size of the sequence.
6068
* @return {number}

0 commit comments

Comments
 (0)