Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
bbox-stream
Advanced tools
An async iterable of coordinates within a bounding box.
npm install bbox-stream
Note: If you're looking for a stream.Readable
: This package does not expose it anymore, but since the Node.js stream
APIs directly support (sync) iterables and async iterables, you likely won't need it.
const coordsIterable = require('bbox-stream')
const it = coordsIterable([52.4, 13.4, 52.6, 13.6], .1)
for await (const coords of it) console.log(coords)
{ lat: 52.4, lon: 13.4 }
{ lat: 52.5, lon: 13.4 }
{ lat: 52.6, lon: 13.4 }
{ lat: 52.4, lon: 13.5 }
{ lat: 52.5, lon: 13.5 }
{ lat: 52.6, lon: 13.5 }
{ lat: 52.4, lon: 13.6 }
{ lat: 52.5, lon: 13.6 }
{ lat: 52.6, lon: 13.6 }
bbox
must an array with 4 numbers, minLat
, minLon
, maxLat
, maxLon
. step
must be a number.
You can pipe the async iterable into a Node.js stream.Writable
using stream.pipeline()
:
const {pipeline} = require('stream')
pipeline(
it,
someWritableStream,
(err) => {
if (err) {
console.error(err)
process.exit(1)
}
}
)
callbag
interfaceconst pipe = require('callbag-pipe')
const coords = require('bbox-stream/callbag')
const forEach = require('callbag-for-each')
pipe(
coords([52.4, 13.4, 52.6, 13.6], .1),
forEach(console.log)
)
If you have a question, found a bug or want to propose a feature, have a look at the issues page.
FAQs
A stream of coordinates within a bounding box.
We found that bbox-stream 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.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.