
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
An easy to use javascript module to get all the information in real time about the trains ©SNCF (only in France)
SNCF.js is an JavaScript library to get all the information in real time about the ©SNCF a French company. It is based on the official api of the SNCF.
npm i sncf.js
https://www.digital.sncf.com/startup/api/token-developpeur
JS
// Call the module
const {Client} = require('sncf.js');
// init the module
const sncf = new Client();
// Login to the SNCF api
sncf.login("YOUR TOKEN").then(async () =>{
// The client was connected !
}).catch(err => {
// Oups, something went wrong, Check your console
console.log(err)
})
// Places
sncf.places.search('STATION_NAME') // Search for a station
sncf.places.get('STATION_ID') // Get a specific station
//Routes
sncf.routes.search('ROUTE_NAME') // Search for a route
sncf.routes.get('ROUTE_ID') // Get a specific route
sncf.routes.stop_areas('ROUTE_ID') // Get the stop areas of a specific route
// User (Get the information about the current session)
sncf.user // Get all informations
sncf.user.id // Get the user id
sncf.user.readyAt // Get the time when the client is ready
sncf.user.connectionType // Get the connection type
sncf.user.shape // Get the shape of the client
sncf.user.uptime // Get the uptime of the client
sncf.user.timezone // Get the timezone of the client
*** all functions are async ***
FAQs
An easy to use javascript module to get all the information in real time about the trains ©SNCF (only in France)
The npm package sncf.js receives a total of 1 weekly downloads. As such, sncf.js popularity was classified as not popular.
We found that sncf.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.