New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amtrak

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amtrak - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

11

dist/index.d.ts

@@ -1,7 +0,8 @@

declare const fetchTrain: (trainId: string) => Promise<import("axios").AxiosResponse<any, any>>;
declare const fetchAllTrains: () => Promise<import("axios").AxiosResponse<any, any>>;
declare const fetchStation: (stationId: string) => Promise<import("axios").AxiosResponse<any, any>>;
declare const fetchAllStations: () => Promise<import("axios").AxiosResponse<any, any>>;
declare const fetchStaleStatus: () => Promise<import("axios").AxiosResponse<any, any>>;
import * as AmtrakerTypes from "./types";
declare const fetchTrain: (trainId: string) => Promise<AmtrakerTypes.TrainResponse>;
declare const fetchAllTrains: () => Promise<AmtrakerTypes.TrainResponse>;
declare const fetchStation: (stationId: string) => Promise<AmtrakerTypes.StationResponse>;
declare const fetchAllStations: () => Promise<AmtrakerTypes.StationResponse>;
declare const fetchStaleStatus: () => Promise<AmtrakerTypes.StaleData>;
export { fetchTrain, fetchAllTrains, fetchStation, fetchAllStations, fetchStaleStatus, };
//# sourceMappingURL=index.d.ts.map

@@ -6,21 +6,26 @@ "use strict";

const fetchTrain = async (trainId) => {
return axios_1.default.get(`https://api-v3.amtraker.com/v3/trains/${trainId}`);
const res = await axios_1.default.get(`https://api-v3.amtraker.com/v3/trains/${trainId}`);
return res.data;
};
exports.fetchTrain = fetchTrain;
const fetchAllTrains = async () => {
return axios_1.default.get("https://api-v3.amtraker.com/v3/trains");
const res = await axios_1.default.get("https://api-v3.amtraker.com/v3/trains");
return res.data;
};
exports.fetchAllTrains = fetchAllTrains;
const fetchStation = async (stationId) => {
return axios_1.default.get(`https://api-v3.amtraker.com/v3/stations/${stationId}`);
const res = await axios_1.default.get(`https://api-v3.amtraker.com/v3/stations/${stationId}`);
return res.data;
};
exports.fetchStation = fetchStation;
const fetchAllStations = async () => {
return axios_1.default.get("https://api-v3.amtraker.com/v3/stations");
const res = await axios_1.default.get("https://api-v3.amtraker.com/v3/stations");
return res.data;
};
exports.fetchAllStations = fetchAllStations;
const fetchStaleStatus = async () => {
return axios_1.default.get("https://api-v3.amtraker.com/v3/stale");
const res = await axios_1.default.get("https://api-v3.amtraker.com/v3/stale");
return res.data;
};
exports.fetchStaleStatus = fetchStaleStatus;
//# sourceMappingURL=index.js.map
{
"name": "amtrak",
"version": "3.0.3",
"version": "3.0.4",
"description": "A simple and easy way to parse data from Amtrak's train tracking API.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc