
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
weather-man
Advanced tools
A JavaScript weather library with multiple weather povider options. Currently it supports the following weather providers: Yahoo, OpenWeatherMap, YR.no, Dark Sky (formerly Forecast.io), Weather Underground, Weather Unlocked, MAAS (Mars) and AQICN.org (for air quality data). Use it in NodeJS, the browser, the command line or even with your Pebble app!
npm install --save weather-man
npm install -g weather-man
var WeatherMan = require('weather-man');
var wm = new WeatherMan(WeatherMan, 'apikey');
wm.getCurrent(latitude, longitude).then(function(result) {
//If the result is for weather
console.log(result.getTemperature(WeatherMan.CELCIUS));
console.log(result.getWindChill(WeatherMan.FAHRENHEIT));
console.log(result.getHeatIndex(WeatherMan.KELVIN));
console.log(result.getWindSpeed(WeatherMan.MILES)); //Or WeatherMan.KILOMETERS or WeatherMan.METERS
console.log(result.getHumidity());
console.log(result.getCondition());
console.log(result.getSunrise());
console.log(result.getSunset());
//If the result is for air quality
console.log('AQI: ' + result.getAQI());
console.log('Location: ' + result.getLocation());
console.log('AQI String: ' + result.getAQIString());
console.log('AQI Color: ' + result.getAQIColor());
});
Grab a copy of example/weather-man.js and include it in your project, then follow the NodeJS example.
weatherman --provider=darksky --lat=123 --lng=456 --units=f --apikey=apikey
Copyright (C) 2016 Brian Douglass
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
FAQs
Multiple weather providers in one spot
The npm package weather-man receives a total of 23 weekly downloads. As such, weather-man popularity was classified as not popular.
We found that weather-man demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.