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.
JavaScript library that builds concave hulls (shapes) by the set of points
Hull.js is a JavaScript library that builds concave hull by the set of points.
See live examples here.
var points = [ [236, 126], [234, 115], [238, 109], [247, 102], ... ];
hull(points, 50); // returns points of the hull (in clockwise order)
[[x1, y1], [x2, y2], ..., [xn, yn]]
;1
- thin shape. Infinity
- convex hull. By default 20
;['.lng', '.lat']
if you have {lng: x, lat: y}
points. By default you can use [x, y]
points.Let's see step by step what happens when you call hull()
function:
This library relies on ES6. The ES6 features used are:
new Set(null)
, Set#add
, Set#has
let
, const
Math.trunc
(if available)You may use polyfills for Set
and compile with babel to continue to support old browsers.
npm install # install dependencies
npm test # build dist file and run tests
npm run watch # watch ./src dir and rebuild dist file
If you want to get involved with Hull.js development, just use github flow and feel free to contribute!
concavity
adjustment based on density.concavity
number) + refactoring.{x: 10, y: 10}
and {lat: 52, lng: 82}
.FAQs
JavaScript library that builds concave hulls (shapes) by the set of points
The npm package hull.js receives a total of 22,607 weekly downloads. As such, hull.js popularity was classified as popular.
We found that hull.js demonstrated a healthy version release cadence and project activity because the last version was released less than 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.