# weather-js

> A module for obtaining weather information

Latest version **2.0.0** (published 2017-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install weather-js
pnpm add weather-js
yarn add weather-js
bun add weather-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-03-15 |
| First published | 2014-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 66 |
| Author | devfacet |
| Maintainers | devfacet |
| Keywords | weather, forecast |

## Links

- npm: https://www.npmjs.com/package/weather-js
- Repository: https://github.com/devfacet/weather
- Homepage: http://github.com/devfacet/weather
- Issues: https://github.com/devfacet/weather/issues
- npm.io page: https://npm.io/package/weather-js

## Dependencies (2)

- [xml2js](https://npm.io/package/xml2js.md) 0.4.x
- [request](https://npm.io/package/request.md) 2.x.x

## Recent versions

- 2.0.0 (latest) — 2017-03-15
- 1.0.3 — 2017-03-06
- 1.0.2 — 2015-03-16
- 1.0.1 — 2014-12-13
- 1.0.0 — 2014-07-04
- 0.1.1 — 2014-06-05
- 0.1.0 — 2014-06-05

## README

# Weather

[![NPM][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage][coverage-image]][coverage-url]

Weather is a module for obtaining weather information.

## Installation

```bash
npm install weather-js
```

## Usage

```javascript
var weather = require('weather-js');

// Options:
// search:     location name or zipcode
// degreeType: F or C

weather.find({search: 'San Francisco, CA', degreeType: 'F'}, function(err, result) {
  if(err) console.log(err);

  console.log(JSON.stringify(result, null, 2));
});
```
```bash
[
  {
    "location": {
      "name": "San Francisco, CA",
      "lat": "37.777",
      "long": "-122.42",
      "timezone": "-7",
      "alert": "",
      "degreetype": "F",
      "imagerelativeurl": "http://blob.weather.microsoft.com/static/weather4/en-us/"
    },
    "current": {
      "temperature": "70",
      "skycode": "32",
      "skytext": "Sunny",
      "date": "2017-03-14",
      "observationtime": "13:15:00",
      "observationpoint": "San Francisco, California",
      "feelslike": "70",
      "humidity": "59",
      "winddisplay": "3 mph West",
      "day": "Tuesday",
      "shortday": "Tue",
      "windspeed": "3 mph",
      "imageUrl": "http://blob.weather.microsoft.com/static/weather4/en-us/law/32.gif"
    },
    "forecast": [
      {
        "low": "52",
        "high": "69",
        "skycodeday": "31",
        "skytextday": "Clear",
        "date": "2017-03-13",
        "day": "Monday",
        "shortday": "Mon",
        "precip": ""
      },
      {
        "low": "52",
        "high": "70",
        "skycodeday": "34",
        "skytextday": "Mostly Sunny",
        "date": "2017-03-14",
        "day": "Tuesday",
        "shortday": "Tue",
        "precip": "10"
      },
      {
        "low": "56",
        "high": "63",
        "skycodeday": "26",
        "skytextday": "Cloudy",
        "date": "2017-03-15",
        "day": "Wednesday",
        "shortday": "Wed",
        "precip": "20"
      },
      {
        "low": "50",
        "high": "64",
        "skycodeday": "28",
        "skytextday": "Mostly Cloudy",
        "date": "2017-03-16",
        "day": "Thursday",
        "shortday": "Thu",
        "precip": "10"
      },
      {
        "low": "53",
        "high": "67",
        "skycodeday": "32",
        "skytextday": "Sunny",
        "date": "2017-03-17",
        "day": "Friday",
        "shortday": "Fri",
        "precip": "10"
      }
    ]
  }
]
```

## Notes

- It uses `weather.service.msn.com`

## License

Licensed under The MIT License (MIT)  
For the full copyright and license information, please view the LICENSE.txt file.

[npm-url]: http://npmjs.org/package/weather-js
[npm-image]: https://badge.fury.io/js/weather-js.svg

[travis-url]: https://travis-ci.org/devfacet/weather
[travis-image]: https://travis-ci.org/devfacet/weather.svg?branch=master

[coverage-url]: https://coveralls.io/github/devfacet/weather?branch=master
[coverage-image]: https://coveralls.io/repos/devfacet/weather/badge.svg?branch=master&service=github

---
_Source: https://npm.io/package/weather-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
