Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
vbb-shapes
Advanced tools
Shapes of lines of the Berlin Brandenburg public transport service (VBB), computed from open GTFS data.
Warning: This module contains JSON files with a total size of roughly 60mb.
npm install vbb-shapes
Let's assume you read trips from vbb-trips
. Each trip has a shapeId
associated.
const shapes = require('vbb-shapes')
shapes('1269')
.then(console.log)
[
[52.48607, 13.4245],
[52.48756, 13.42648],
// …
[52.5135, 13.52988],
[52.51373, 13.52003]
]
You can also read all shapes from a readable stream in object mode, emitting one shape (as shown above) at once.
const allShapes = require('vbb-shapes/all')
allShapes()
.on('data', console.log)
.on('error', console.error)
By adding the optional param formatAsLineString = true
you'll receive a GeoJSON encoded result set.
const shapes = require('vbb-shapes')
shapes('1269', true)
.then(console.log)
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[13.4245, 52.48607],
[13.42648, 52.48756],
// …
[13.52988, 52.5135],
[13.52003, 52.51373]
]
},
"properties": {}
}
]
}
For all shapes:
const allShapes = require('vbb-shapes/all')
allShapes(true)
.on('data', console.log)
.on('error', console.error)
If you have a question, found a bug or want to propose a feature, have a look at the issues page.
FAQs
Shapes of VBB lines.
The npm package vbb-shapes receives a total of 33 weekly downloads. As such, vbb-shapes popularity was classified as not popular.
We found that vbb-shapes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.