yui/yui3 — pull request #1308 by customcommander (2013-10-11 14:47:07+00:00)
Title: Y.ArrayAssert.isUnique()

Hi,

Following up #1287

This pull request introduces a new method to `Y.ArrayAssert` so that we can rewrite the following test:

```javascript
"users array should be unique": function () {
var users = MyApp.getUsers();
Y.Assert.isTrue(Y.Array.unique(users).length === users.length);
}
```

In a more readable way (I hope):

```javascript
"users array should be unique": function () {
var users = MyApp.getUsers();
Y.ArrayAssert.isUnique(users);
}
```

The new method also accepts a custom comparison function for non trivial values such as objects.

Thanks,