Version: v0.7.1 - Beta.  We welcome contributors & feedback.

List.containsAll

containsAll($otherList) -> boolean

Description

Return true if the List has all of the items in $otherList

Only the unique values of each list are compared. Duplicate values are ignored.

['a', 'b', 'c'].containsAll(['b', 'c'])
//= true

['a', 'b', 'c'].containsAll(['b', 'c', 'z'])
//= false

['a', 'b', 'b'].containsAll(['a', 'b'])
//= true

See Also