Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoulder4 committed Aug 21, 2023
1 parent 8094b1e commit a00c1ff
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions dist/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
Object.defineProperty(exports, "__esModule", { value: true });
const findTrains_1 = require("./findTrains");
const trackTrain_1 = require("./trackTrain");
const util = require("util");
// const util = require("util");
module.exports = {
findTrains: findTrains_1.default,
trackTrain: trackTrain_1.trackTrain,
};
(0, trackTrain_1.trackTrain)("G59487").then((emitter) => {
emitter.on("journey", (data) => {
console.log(util.inspect(data, false, null, true));
});
emitter.on("information", (data) => {
console.log(util.inspect(data, false, null, true));
});
});
// trackTrain("G59487").then((emitter) => {
// emitter.on("journey", (data) => {
// console.log(util.inspect(data, false, null, true));
// });
// emitter.on("information", (data) => {
// console.log(util.inspect(data, false, null, true));
// });
// });
// (async () => {
// const data = await findTrains("BHM", "2023-08-19")
// console.log(util.inspect(data, false, null, true));
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"name": "trainspy",
"description": "Get departures at any UK train station & recieve instant real-time updates on trains throughout their journey via this custom made Realtimetrains scraper.",
"version": "2.0.3",
"version": "2.0.4",
"main": "dist\\src\\index.js",
"directories": {
"test": "tests"
Expand Down
18 changes: 9 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import findTrains from "./findTrains";
import { trackTrain } from "./trackTrain";
const util = require("util");
// const util = require("util");
module.exports = {
findTrains,
trackTrain,
};

trackTrain("G59487").then((emitter) => {
emitter.on("journey", (data) => {
console.log(util.inspect(data, false, null, true));
});
emitter.on("information", (data) => {
console.log(util.inspect(data, false, null, true));
});
});
// trackTrain("G59487").then((emitter) => {
// emitter.on("journey", (data) => {
// console.log(util.inspect(data, false, null, true));
// });
// emitter.on("information", (data) => {
// console.log(util.inspect(data, false, null, true));
// });
// });
// (async () => {
// const data = await findTrains("BHM", "2023-08-19")
// console.log(util.inspect(data, false, null, true));
Expand Down

0 comments on commit a00c1ff

Please sign in to comment.