1.0.1 • Published 4 years ago

@utu-global/direct-locations v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

UTU Direct Locations Helper

NPM Unit Test

Small UTU-lity to help you quickly extract Direct locations data from CMS API.

How to use

Install with NPM

$ npm install @utu-global/direct-locations

Import in your JS files

import { UTUDirectLocations } from '@utu-global/direct-locations';

Get the data fron the API and pass it to the helper specifying the category

const serviceItems = UTUDirectLocations(API_RESPONSE_DATA, 'service-counter');
const customsItems = UTUDirectLocations(API_RESPONSE_DATA, 'customs-office');

Done!

Contribute/Development

The source code is available in the /src folder as Typescript files.

To compile the .ts files to .js, step required to run the tests and the demo, simply type:

$ npm run compile

To start a simple server running the demo folder:

$ npm run demo

You can run the unit tests (written with AVA) with the command:

$ npm run test

Feel free to submit issues or PRs.

License

Release under the MIT license.