function _uniq($array, $isSorted = false, $iterator = NULL, $context = NULL)
{
    return Underscore::uniq($array, $isSorted, $iterator, $context);
}
Пример #2
0
 /**
  * @tags arrays
  */
 public function testUniq()
 {
     // it should produce a duplicate-free version of the array
     $this->typeTolerant(['a' => 1, 'b' => 2, 'c' => 3, 'd' => 3], [1, 2, 3], function ($in, $out) {
         $this->array(_::uniq($in))->isEqualTo($out);
     }, [0, -1]);
     // it should return an empty array if list is empty
     $this->array(_::uniq(null))->isEqualTo([]);
 }