
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN)
Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN).
Ce module permet de récupérer:
Kind: global class
Promise.<Array.<Ligne>>
Promise.<Array.<Arret>>
Promise.<Array.<Passage>>
Promise.<Array.<Direction>>
Promise.<Array.<Arret>>
Promise.<Array.<Ligne>>
Lister les lignes du réseau de transport
Kind: static method of Stan
Example
const { Stan } = require('stan-api')
Stan.getLignes().then(lignes => console.log(lignes))
Promise.<Array.<Arret>>
Liste des arrêts d'une ligne
NB: Un arret peut être commun à plusieurs lignes.
Kind: static method of Stan
Param | Type | Description |
---|---|---|
ligne | Ligne | Ligne |
Example
const { Stan } = require('stan-api')
const ligneT4 = {
id: 2332,
numlignepublic: 'T4',
osmid: 'line:GST:4-97',
libelle: 'Tempo 4 - Laxou CLB <> Houdemont Porte Sud'
}
Stan.getArrets(ligneT4).then(arrets => console.log(arrets))
Promise.<Array.<Passage>>
Lister les prochains passages d'un arrêt avec le temps d'attente estimé. Il n'est pas nécessaire de préciser une ligne, on récupère alors tous les passages des lignes desservants l'arrêt
Kind: static method of Stan
Param | Type | Description |
---|---|---|
arret | Arret | Arrêt |
Example
const { Stan } = require('stan-api')
const arret = {
ligne: {
id: 2332,
numlignepublic: 'T4',
osmid: 'line:GST:4-97',
libelle: 'Tempo 4 - Laxou CLB <> Houdemont Porte Sud'
},
libelle: 'Place Stanislas - Dom Calmet',
osmid: 'stop_point:GST:SP:NYPCL1'
}
Stan.getProchainsPassages(arret).then(p => {
console.log(`Liste des prochains passages de l'arrêt "${arret.libelle}" de la ligne ${arret.ligne.numlignepublic}:
${p.map(passage => `${passage.direction} - Temps d'attente: ${Math.trunc(passage.temps_min/60)}H${passage.temps_min%60}min`).join('\n')}`)
})
Exemple sortie:
Liste des prochains passages de l'arrêt "Place Stanislas - Dom Calmet" de la ligne T4:
Direction Houdemont Porte Sud - Temps d'attente: 0H1min
Direction Houdemont Porte Sud - Temps d'attente: 0H8min
Direction Laxou Champ-le-Boeuf - Temps d'attente: 0H1min
Direction Laxou Champ-le-Boeuf - Temps d'attente: 0H8min
Promise.<Array.<Direction>>
Lister les directions d'une ligne
Kind: static method of Stan
Param | Type | Description |
---|---|---|
ligne | Ligne | Ligne |
Example
const { Stan } = require('stan-api')
const ligneT4 = {
id: 2332,
numlignepublic: 'T4',
osmid: 'line:GST:4-97',
libelle: 'Tempo 4 - Laxou CLB <> Houdemont Porte Sud'
}
Stan.getDirections(ligneT4).then(directions => console.log(directions))
Promise.<Array.<Arret>>
Lister les arrêts sur le chemin d'une direction d'une ligne
Kind: static method of Stan
Param | Type | Description |
---|---|---|
direction | Direction | Direction d'une ligne |
FAQs
Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN)
The npm package stan-api receives a total of 2 weekly downloads. As such, stan-api popularity was classified as not popular.
We found that stan-api demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.