Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/claudiopro/lunch-on-us
:fork_and_knife: Coding exercise to read and filter a list of customers with coords to matching proximity criteria
https://github.com/claudiopro/lunch-on-us
Last synced: about 1 month ago
JSON representation
:fork_and_knife: Coding exercise to read and filter a list of customers with coords to matching proximity criteria
- Host: GitHub
- URL: https://github.com/claudiopro/lunch-on-us
- Owner: claudiopro
- Created: 2015-11-09T17:20:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-11T12:45:59.000Z (about 9 years ago)
- Last Synced: 2023-08-02T02:35:56.124Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/claudiopro/lunch-on-us.svg?branch=master)](https://travis-ci.org/claudiopro/lunch-on-us)
# lunch-on-us
Coding exercise to read and filter a list of customers with coords to matching proximity criteria. Uses [Great-circle distance](https://en.wikipedia.org/wiki/Great-circle_distance) to measure distances.
The program receives a text file whose lines are JSON objects with the following schema as input:
```json
{"latitude": "52.986375", "user_id": 12, "name": "Christina McArdle", "longitude": "-6.043701"}
```# Instructions
```bash
git clone [email protected]:claudiopro/lunch-on-us.git
cd lunch-on-us
npm install
node index.js customers.txt
```Run tests:
```bash
npm test
```## Note
This code uses ES6 syntax (`const`), so if you use `node <4.0.0` you must pass the `--harmony` flag:
```bash
node --harmony index.js customers.txt
```# License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) Claudio Procida 2015