I have 2 arrays which both containing strings, for example:

```
a = ['a', 'b', 'a']
b = ['b', 'a', 'a']

```

I have found that I can use lodash with:

```
_.isEmpty(_.xor(a,b))

```

to make sure they both equal.  

However this method seems to fail if I have duplicated values in the arrays, for example:

```
a = ['a', 'b', 'a']
b = ['b', 'a']

```

the above method will return true for this case (it will print they are equal) although I have 2 'a' in a array and only 1 in b.

Any elegant ways to perform this comparison?