Socket
Book a DemoInstallSign in
Socket

dwd-warn

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dwd-warn

Get official dwd warnings.

1.0.1
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

dwd-warn

Unofficial api for official DWD warnings. Uses the official JSONP warn file which is located here. Warnings are always up to date with a maximum delay of 10 minutes. Learn more here.

Starter guide

1. Install the package

Install this package with npm:

npm install dwd-warn

2. Import the package

Inside your nodejs script import the package:

const dwd = require("dwd-warn").default;
// or
import dwd from "dwd-warn";

3. Fetch the warnings!

Fetch the current warnings. This code is asynchronous, it uses Promises, an asynchronous wrapper function is recommended.

async main(){
    const warnings = await dwd.fetchWarnings();
    const ahrweiler_warnings = warnings.filterByRegionName("Kreis Ahrweiler");

    if(ahrweiler_warnings){
        console.log(ahrweiler_warnings);
    }else{
        console.log("No warnings available!");
    }
}

main();

Community

This project is updated on demand. If you have a question, found a bug or similar feel free to ask here.

Keywords

dwd

FAQs

Package last updated on 05 Nov 2023

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.