1.0.0 • Published 8 years ago

distinct-values v1.0.0

Weekly downloads
30
License
ISC
Repository
github
Last release
8 years ago

distinct-values

return a distinct set of values based on a hashing function

Usage

var distinct = require('distinct-values');

var books = [
        {
            title: 'the wind in the willows'
        },
        {
            title: 'harry potter'
        },
        {
            title: 'something else'
        },
        {
            title: 'harry potter'
        }
    ];

var distinctBooks = distinct(books, function(book){
        return book.title;
    });