# searching-customer-within-a-range

> Searching algorithm - Reading the full list of customers (within 100km), Calculating distance between two latitude-longitude points (Haversine formula)

Latest version **1.0.2** (published 2020-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install searching-customer-within-a-range
pnpm add searching-customer-within-a-range
yarn add searching-customer-within-a-range
bun add searching-customer-within-a-range
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-01-30 |
| First published | 2020-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ishwar Chandra Tiwari |
| Maintainers | ishwarchandra |
| Keywords | searching-customer-within-a-range, Sorting, code-challenge, ishwarchandra, Haversine formula, getDistanceFromLatLonInKm |

## Links

- npm: https://www.npmjs.com/package/searching-customer-within-a-range
- Repository: https://github.com/ishwarchandratiwari/searching-customer-within-a-range
- Homepage: https://github.com/ishwarchandratiwari/searching-customer-within-a-range#readme
- Issues: https://github.com/ishwarchandratiwari/searching-customer-within-a-range/issues
- npm.io page: https://npm.io/package/searching-customer-within-a-range

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-01-30
- 1.0.1 — 2020-01-22
- 1.0.0 — 2020-01-22

## README

## Requirements
-We have some customer records in a text file (customers.txt) -- one customer per line, JSON lines formatted. We want to invite any customer within 100km of Dublin for some food and drinks on us. Write a program that will read the full list of customers and output the names and user ids of matching customers (within 100km), sorted by User ID (ascending). 
-Don't forget, you'll need to convert degrees to radians.
-The GPS coordinates for Dublin area is 53.339428, -6.257664. We're looking for you to produce working code, with enough room to demonstrate how to structure components in a small program. Package the searching algorithm as an abstraction layer and installable component through npm package.


## Usage

### Require

```
let filterCustomer = require('searching-customer-within-a-range');
or
import filterCustomer from 'searching-customer-within-a-range';
```


	filterCustomer.searchingCustomers().catch((err) => {
      console.log(`Error received: `, err.message);
    }).then((eligibleCustomers) => {
      console.log(eligibleCustomers);
    });
```
```



## Testing Repo

https://github.com/ishwarchandratiwari/testingnpmpackage-searching-customer-within-a-range


just hit:
npm install;
npm start;

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