Socket
Socket
Sign inDemoInstall

weathered

Package Overview
Dependencies
267
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

2

dist/client.d.ts

@@ -7,3 +7,3 @@ import { ClientOptions, ForecastResponse, AlertsResponse, ForecastType, AlertOptions } from './types';

private getUrl;
getAlerts(options: AlertOptions): Promise<AlertsResponse>;
getAlerts(active: boolean, options: AlertOptions): Promise<AlertsResponse>;
private getPoint;

@@ -10,0 +10,0 @@ getForecast(latitude: number, longitude: number, forecastType: ForecastType): Promise<ForecastResponse>;

@@ -9,3 +9,3 @@ "use strict";

const defaultOptions = {
userAgent: 'weathered module version 0.0.0'
userAgent: 'weathered package'
};

@@ -38,5 +38,5 @@ const API_ROOT = 'https://api.weather.gov/';

}
getAlerts(options) {
getAlerts(active, options) {
const params = processOptions(options);
const path = `alerts${options.active ? '/active' : ''}?${params}`;
const path = `alerts${active ? '/active' : ''}?${params}`;
return this.getPath(path);

@@ -43,0 +43,0 @@ }

@@ -23,9 +23,6 @@ declare type ForecastType = 'hourly' | 'baseline';

}
interface ActiveOption {
active: boolean;
}
interface UrgencyOption {
urgency?: Urgency;
}
declare type AlertOptions = ActiveOption & UrgencyOption & XOR<AreaOption, XOR<PointOption, XOR<RegionOption, RegionTypeOption>>>;
declare type AlertOptions = UrgencyOption & XOR<AreaOption, XOR<PointOption, XOR<RegionOption, RegionTypeOption>>>;
interface ClientOptions {

@@ -32,0 +29,0 @@ userAgent?: string;

{
"name": "weathered",
"version": "0.0.2",
"version": "0.0.3",
"description": "A JavaScript wrapper for the National Weather Service API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -6,3 +6,3 @@ import fetch from 'cross-fetch';

const defaultOptions: ClientOptions = {
userAgent: 'weathered module version 0.0.0'
userAgent: 'weathered package'
};

@@ -47,5 +47,5 @@

getAlerts(options: AlertOptions) : Promise<AlertsResponse> {
getAlerts(active: boolean, options: AlertOptions) : Promise<AlertsResponse> {
const params = processOptions(options);
const path = `alerts${ options.active ? '/active' : ''}?${params}`;
const path = `alerts${ active ? '/active' : ''}?${params}`;
return this.getPath(path);

@@ -52,0 +52,0 @@ }

@@ -40,5 +40,2 @@ type ForecastType = 'hourly' | 'baseline';

}
interface ActiveOption {
active: boolean;
}

@@ -49,3 +46,3 @@ interface UrgencyOption {

type AlertOptions = ActiveOption & UrgencyOption & XOR<AreaOption, XOR<PointOption, XOR<RegionOption, RegionTypeOption>>>;
type AlertOptions = UrgencyOption & XOR<AreaOption, XOR<PointOption, XOR<RegionOption, RegionTypeOption>>>;

@@ -52,0 +49,0 @@ interface ClientOptions {

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