An open API service indexing awesome lists of open source software.

https://github.com/winterbe/compary

A library for composing complex compare-functions in JavaScript
https://github.com/winterbe/compary

Last synced: 6 months ago
JSON representation

A library for composing complex compare-functions in JavaScript

Awesome Lists containing this project

README

          

# Compary [![Travic CI](https://travis-ci.org/winterbe/compary.svg?branch=master)](https://travis-ci.org/winterbe/compary)

> A library for composing complex compare-functions.

```js
persons.sort(
compareBy(p => p.lastName)
.thenBy(p => p.firstName)
);
```

---


★★★ Like this project? Leave a star and feedback on Twitter! Thanks. ★★★

---

## Getting started

Download the [latest release](https://github.com/winterbe/compary/releases) from GitHub or install Compary from [NPM](https://www.npmjs.com/package/compary):

```bash
npm install --save compary
```

Alternatively use Compary from [CDN](https://unpkg.com/compary/) by adding this to your HTML:

```html

```

## License

MIT © [Benjamin Winterberg](https://twitter.com/winterbe_)