Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/loitd/lutilsjs
- Owner: loitd
- License: mit
- Created: 2019-06-23T18:04:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T03:56:39.000Z (9 months ago)
- Last Synced: 2024-08-09T14:05:51.886Z (3 months ago)
- Language: JavaScript
- Size: 66.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 }
```