@utu-global/direct-locations

1.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @utu-global/direct-locations

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

47.5 kB

Total Files

12

Last publish

Collaborators

  • utu-admin