# ridematcher

> Find carpool/vanpool matches

Latest version **0.2.0** (published 2015-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install ridematcher
pnpm add ridematcher
yarn add ridematcher
bun add ridematcher
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2015-07-16 |
| First published | 2015-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Conveyal |
| Maintainers | trevorgerhardt |
| Keywords | carpool, commuters, tdm |

## Links

- npm: https://www.npmjs.com/package/ridematcher
- Repository: https://github.com/conveyal/ridematcher.js
- Issues: https://github.com/conveyal/ridematcher.js/issues
- npm.io page: https://npm.io/package/ridematcher

## Dependencies (5)

- [rbush](https://npm.io/package/rbush.md) ^1.4.0
- [turf-point](https://npm.io/package/turf-point.md) ^2.0.1
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^5.6.15
- [turf-distance](https://npm.io/package/turf-distance.md) ^1.0.1
- [turf-destination](https://npm.io/package/turf-destination.md) ^1.2.1

## Recent versions

- 0.2.0 (latest) — 2015-07-16
- 0.3.0 — 2015-07-16
- 0.1.0 — 2015-07-01
- 0.0.3 — 2015-07-01
- 0.0.2 — 2015-06-29
- 0.0.1 — 2015-06-29

## README

# ridematcher

[![build status](https://secure.travis-ci.org/conveyal/ridematcher.js.png)](http://travis-ci.org/conveyal/ridematcher.js)

Find carpool/vanpool matches within a commuter population


### `findMatches(commuters, opts)`

Make a SOAP request to [Commuter Connections](http://www.commuterconnections.org/) to get the number of carpools available for a given starting, ending location, and search radius.

### Parameters

| parameter   | type   | description                               |
| ----------- | ------ | ----------------------------------------- |
| `commuters` | Array  | Array of commuters to match to each other |
| `opts`      | Object | Options object                            |


### Example

```js
import {findMatches} from 'commuter-connections'
findMatches({
  commuters: [{
    _id: 1,
    from: [-77.4875, 39.0436],
    to: [..]
  }], {
    radius: .5,
    units: 'miles'
}}).then((matches) => {
    console.log(matches) // map of commuter id's to matching commuter id's
}, handleError)
```


**Returns** `Promise`, promise

## Installation

Requires [nodejs](http://nodejs.org/).

```sh
$ npm install ridematcher
```

## Tests

```sh
$ npm test
```

---
_Source: https://npm.io/package/ridematcher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
