Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/loitd/lutilsjs

Loitd Utilities Library for JavaScript
https://github.com/loitd/lutilsjs

Last synced: about 1 month ago
JSON representation

Loitd Utilities Library for JavaScript

Awesome Lists containing this project

README

        

# lutilsjs
Git: [https://github.com/loitd/lutilsjs](https://github.com/loitd/lutilsjs)
NPM: [https://www.npmjs.com/package/lutilsjs](https://www.npmjs.com/package/lutilsjs)
Web: [https://inneka.com](https://inneka.com/)
## Installation
`npm install --save lutilsjs`
or
`yarn add lutilsjs`
## Usage
View more [here](https://github.com/loitd/lutilsjs/blob/master/test.js)
### Import
`var lutils = require('lutilsjs');`
or
`var {print, getLocationId} = require('./index');`
### Calling
```
lutils.getWeatherFromLocation('vaannaam').then((wea)=>{
lutils.print(wea);
}).catch((e) => {
lutils.print(e);
});
```
or
`const woeid = getLocationId('hà nội');`
### Sample output
```
{ title: 'Hà Nội',
parent: 'Vietnam',
weather_state_name: 'Heavy Rain',
applicable_date: '2019-06-25',
min_temp: 26.68,
max_temp: 35.120000000000005,
the_temp: 31.41 }
```