Socket
Socket
Sign inDemoInstall

@abh78989/fast-weather

Package Overview
Dependencies
16
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @abh78989/fast-weather

A simple weather module


Version published
Maintainers
1
Install size
2.90 MB
Created

Readme

Source

Fast Weather

Fast-Weather is an easy to use module with no api key!

Installation

npm i @abh78989/fast-weather

Quick Intro

  • searching
const weather = require("@abh78989/fast-weather");
weather.search("chicago").then(console.log);
/*
Search {
  results: [
    SearchRes {
      address: 'Chicago, Illinois, United States',
      district: [Object],
      city: 'Chicago',
      country: [Object],
      name: 'Chicago',
      timezone: 'America/Chicago',
      latitude: 41.876,
      postalCode: '60605',
      iataCode: 'MDW',
      icaoCode: 'KMDW'
    }
  ]
}
*/
//example is shortened
  • Getting Weather
const weather = require("@abh78989/fast-weather");
Weather.search("chicago").then(x=>x.results[0].weather().then(console.log))
/*
Weather {
  temperature: '12°',
  feelsLike: '11°',
  sunriseTime: '06:29',
  sunsetTime: '16:37',
  highest: '22°',
  lowest: '11°',
  windSpeed: '8 km/h',
  humidity: '67%',
  dewPoint: '6°',
  pressure: '1021.3 mb',
  UVIndex: '0 of 10',
  visibiliy: 'Unlimited',
  moonPhase: 'Waning Gibbous',
  AirQualityIndex: '43'
}
*/

Note

Please use languages to specify fahrenheit or celcius by default language is set to en-GB for celsius you can use en-US for fahrenheit

  • Example
Weather.search("chicago",{language : "en-US"})

source : Weather.com

Keywords

FAQs

Last updated on 06 Nov 2020

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