Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@conveyal/lonlat
Advanced tools
Lat/lon normalization cause...sigh.
No one has agreed on a standard way of representing lat/lon. This is a small normalization library. Use this to convert all outside input before processing internally and convert to an external format right when it's being output.
{lon: ${longitude}, lat: ${latitude}}
representationUtilizing this won't always be possible/easiest, so please at least adopt the following conventions. Any variables or functions that contain the following names should be represented by the accompanying structure:
latlon
: {lon: ${longitude}, lat: ${latitude}}
coordinates
: [${longitude}, ${latitude}]
point
: {x: ${longitude}, y: ${latitude}}
If you must convert it to a string, put it in the following format:
'${longitude},${latitude}'
import assert from 'assert'
import ll from 'lonlng'
const lat = 38.13234
const lon = 70.01232
const latlon = {lat, lon}
const point = {x: lon, y: lat}
const coordinates = [lon, lat]
const str = `${lon},${lat}`
const pairs = [
// normalization
[latlon, ll(latlon)],
[latlon, ll(point)],
[latlon, ll(coordinates)],
[latlon, ll(str)],
// convert to type, normalizes to `latlng` first in each function
[ll.toCoordinates(latlon), coordinates],
[ll.toPoint(latlon), point],
[ll.toString(latlon), str],
// if the type is known, use the specific convert function directly
[latlon, ll.fromLatlng(latlon)],
[latlon, ll.fromCoordinates(coordinates)],
[latlon, ll.fromPoint(point)],
[latlon, ll.fromString(str)]
]
pairs.forEach(pair => assert.deepEqual(pair[0], pair[1]))
FAQs
Lon/lat normalization
The npm package @conveyal/lonlat receives a total of 287 weekly downloads. As such, @conveyal/lonlat popularity was classified as not popular.
We found that @conveyal/lonlat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.