
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
yahoo-weather
Advanced tools
node-yahoo-weather is a dead simple isomorphic JavaScript weather module in 10 lines of code.
The code is written using ES2015 and simply transformed back using babel to the dist
directory using a Grunt task.
I made this module cause I need it and I feel it may be used by someone, someday. Let's get started! :grin:
Clone the repo or install it from npm
:
npm install yahoo-weather --save
Dead simple, as I said! Just one required param. Check it:
import weather from 'yahoo-weather'; // or require it
weather('tehran').then(info => {
// Do what you want with `info`!
}).catch(err => {
// Oops! Errors! :(
});
weather('tehran', 'f').then(info => { // second arg is the weather unit. you can pass 'c' or 'f'. defaults to 'c'.
// Do what you want with `info`!
}).catch(err => {
// Oops! Errors! :(
});
// or use it with awesome async & await
async () => {
try {
const info = await weather('tehran');
// Do what you want with `info`!
} catch (err) {
// Oops! Errors! :(
}
}();
Run the tests with following command:
npm test
Just fill an issue and describe it. I'll check it ASAP. :grin:
You can fork the repository, improve or fix it and then send the pull requests back if you want to see them here. I really appreciate that. :heart:
Remember to lint your code before sending pull requests. Execute the linter script by running the following command and fix the errors if you get any.
npm run lint
FAQs
A simple yahoo weather API wrapper
The npm package yahoo-weather receives a total of 172 weekly downloads. As such, yahoo-weather popularity was classified as not popular.
We found that yahoo-weather 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.