Sha256: d10964d71bd78458a9c01475be83d4e2b91ebd651a9a2e41edef7d5239bb156b

Contents?: true

Size: 518 Bytes

Versions: 3

Compression:

Stored size: 518 Bytes

Contents

nub
===

Return all the unique elements of an array. You can specify your own uniqueness
comparison function with `nub.by` too.

These work like haskell's `nub` and `nubBy` functions in Data.List.

methods
=======

nub(xs)
-------

Return a new array with all the uniqe elements in `xs`.

Uniqueness is calculated `===` style so the types matter.

nub.by(xs, cmp)
---------------

Use `cmp(x,y)` function to compare elements instead of the default.
`cmp` should return whether the two elements are equal as a boolean.

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
snowball-0.1.22 node_modules/browserify/node_modules/nub/README.markdown
sprockets-browserify-0.1.2 node_modules/browserify/node_modules/nub/README.markdown
sprockets-browserify-0.1.0 node_modules/browserify/node_modules/nub/README.markdown