
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.
nearby-sort
Advanced tools
This is very small and lightweight library that is capable to sort the given array by provided location coordinates.
Install nearby-sort with npm
npm install nearby-sort // npm
yarn add nearby-sort // yarn
import nearbySort from 'nearby-sort'; // ES6
const nearbySort = require("nearby-sort"); // CommonJS
// User's location
const coordinates = {
lat: 31.442907,
long: 74.271519,
};
// Array need to be sorted
const arr = [
{
name: 'Kudos',
lat: 31.460443680085763,
long: 74.26974289747655,
},
{
name: 'Dr Hospital',
lat: 31.480616187193373,
long: 74.28008468009904,
},
{
name: 'Steak Studio',
lat: 31.446620698317826,
long: 74.2704643576623,
},
];
// Asc Sort
let ascSortedData = await nearbySort(coordinates, arr);
// Desc Sort
let descSortedData = await nearbySort(coordinates, arr, false);
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
nearby-sort © Yousuf
Authored and maintained by Yousuf Kalim.
GitHub @yousufkalim · LinkedIn @yousufkalim
FAQs
The library to sort array of objects by distance from a given point
The npm package nearby-sort receives a total of 341,327 weekly downloads. As such, nearby-sort popularity was classified as popular.
We found that nearby-sort 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.