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.0 to 3.0.1

7

dist/index.d.ts

@@ -1,2 +0,7 @@

export {};
import { Train, StationMeta, TrainResponse, StationResponse } from "./types";
declare const fetchTrain: (trainId: string) => Promise<Train>;
declare const fetchAllTrains: () => Promise<TrainResponse>;
declare const fetchStation: (stationId: string) => Promise<StationMeta>;
declare const fetchAllStations: () => Promise<StationResponse>;
export { fetchTrain, fetchAllTrains, fetchStation, fetchAllStations };
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchAllStations = exports.fetchStation = exports.fetchAllTrains = exports.fetchTrain = void 0;
const node_fetch_1 = require("node-fetch");
const fetchTrain = async (trainId) => {
const res = await (0, node_fetch_1.default)(`https://api-v3.amtraker.com/v3/trains/${trainId}`);
const data = await res.json();
return data;
};
exports.fetchTrain = fetchTrain;
const fetchAllTrains = async () => {

@@ -9,2 +16,15 @@ const res = await (0, node_fetch_1.default)("https://api-v3.amtraker.com/v3/trains");

};
exports.fetchAllTrains = fetchAllTrains;
const fetchStation = async (stationId) => {
const res = await (0, node_fetch_1.default)(`https://api-v3.amtraker.com/v3/stations/${stationId}`);
const data = await res.json();
return data;
};
exports.fetchStation = fetchStation;
const fetchAllStations = async () => {
const res = await (0, node_fetch_1.default)("https://api-v3.amtraker.com/v3/stations");
const data = await res.json();
return data;
};
exports.fetchAllStations = fetchAllStations;
//# sourceMappingURL=index.js.map

@@ -79,2 +79,7 @@ export interface Train {

}
export interface StaleData {
avgLastUpdate: number;
activeTrains: number;
stale: boolean;
}
//# sourceMappingURL=types.d.ts.map

2

package.json
{
"name": "amtrak",
"version": "3.0.0",
"version": "3.0.1",
"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

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