searching-customer-within-a-range

1.0.2 • Public • Published

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;

Package Sidebar

Install

npm i searching-customer-within-a-range

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

11.7 kB

Total Files

8

Last publish

Collaborators

  • ishwarchandra