Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
leaflet-lasso
Advanced tools
Lasso selection plugin for Leaflet
Supports all Leaflet vector layers:
getBounds
and toGeoJSON
methodsSelection modes:
npm install leaflet-lasso
or
<script src="https://unpkg.com/leaflet-lasso@2.2.13/dist/leaflet-lasso.umd.min.js"></script>
import "leaflet-lasso";
For detailed API, please see exported TypeScript typings.
Use for custom activation.
interface LassoHandlerOptions {
polygon?: L.PolylineOptions,
intersect?: boolean;
}
const lasso = L.lasso(map, options);
yourCustomButton.addEventListener('click', () => {
lasso.enable();
});
Use for default control.
interface LassoControlOptionsData {
title?: string;
}
type LassoControlOptions = L.ControlOptions & LassoControlOptionsData & LassoHandlerOptions;
L.control.lasso(options).addTo(map);
Listen for this event to receive matching Leaflet layers.
interface LassoHandlerFinishedEventData {
originalEvent: MouseEvent;
latLngs: L.LatLng[];
layers: L.Layer[];
}
type LassoHandlerFinishedEvent = L.LeafletEvent & LassoHandlerFinishedEventData;
map.on('lasso.finished', (event: LassoHandlerFinishedEvent) => {
console.log(event.layers);
});
Icon by @Falke-Design
FAQs
Lasso selection plugin for Leaflet
The npm package leaflet-lasso receives a total of 4,603 weekly downloads. As such, leaflet-lasso popularity was classified as popular.
We found that leaflet-lasso 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.