New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

yr-lib

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yr-lib

yr.no api

latest
Source
npmnpm
Version
1.0.20
Version published
Weekly downloads
17
Maintainers
1
Weekly downloads
 
Created
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

weather

FAQs

Package last updated on 27 Feb 2017

Did you know?

Socket

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