Socket
Socket
Sign inDemoInstall

yr-lib

Package Overview
Dependencies
71
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

yr-lib

yr.no api


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

Yr.no library

A simple library to call the Yr.no XML based api and return response in JSON

Installation

$ cd root project
$ npm install yr-lib

Usage

ES5
var LocationForecast = require('yr-lib').LocationForecast;
LocationForecast(lat, lon,function(data) {
	//do something with data  
});

ES6
import { LocationForecast } from 'yr-lib';
LocationForecast(lat, lon, data => {
	//do something with data      
});
Get weather in current day and time
ES5
var CurrentLocationForecast = require('yr-lib').CurrentLocationForecast;
CurrentLocationForecast(lat, lon, local_time, time_diff_hour, function(data) {
	//do something with data  
});

ES6
import { CurrentLocationForecast } from 'yr-lib';
CurrentLocationForecast(lat, lon, local_time, time_diff_hour, data => {
	//do something with data      
});

Keywords

FAQs

Last updated on 27 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc