Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Utility library for calculating the nearest set of things to a target thing, geospatially speaking
Nearest.js is a small utility library for calculating the nearest set of things to a target thing, geospatially speaking. In JavaScript.
For example, a list of restaurant reviews near to where you work,
Include in your page,
<script src="nearest.js"></script>
... and the Nearest.find
function will return the items in that list sorted approximately in order of the distance from a given coordinate.
results = new Nearest().find(dataSource, { coords: [51.5349, -0.1219], limit: 10, within: 3 } )
The parameters in full,
dataSource
- a data structure as per the format outline below.coords
- the lat/lon pair of the central location you want the search to start from.limit
- limit the number of results returned.within
- limit results to within n kilometers.Nearest.js requires a datasource containing a list of objects, each containing a lat and lon property.
[
{
"path": "lifeandstyle/2012/jan/08/jay-rayner-restaurant-review-create",
"restaurant": "Create",
"reviewer": "John Lanchester",
"lat": "53.797331",
"lon": "-1.549829"
},
{
"path": "lifeandstyle/2012/jan/06/granger-and-co-restaurant-review",
"reviewer": "John Lanchester",
"lat": "51.514502",
"lon": "-0.198357",
"links": [
"foo": "http://example.com/foo",
"bar": "http://example.com/bar"
]
}
...
]
FAQs
Utility library for calculating the nearest set of things to a target thing, geospatially speaking
The npm package nearestjs receives a total of 2 weekly downloads. As such, nearestjs popularity was classified as not popular.
We found that nearestjs 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.