Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
@types/kd-tree-javascript
Advanced tools
TypeScript definitions for kd-tree-javascript
npm install --save @types/kd-tree-javascript
This package contains type definitions for kd-tree-javascript (https://github.com/ubilabs/kd-tree-javascript#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kd-tree-javascript.
export class kdTree<T> {
// Create a new tree from a list of points, a distance function, and a
// list of dimensions.
constructor(points: T[], distance: (a: T, b: T) => number, dimensions: Array<keyof T>);
// Query the nearest *count* neighbors to a point, with an optional
// maximal search distance.
// Result is an array with *count* elements.
// Each element is an array with two components: the searched point and
// the distance to it.
nearest(point: T, count: number, maxDistance?: number): Array<[T, number]>;
// Insert a new point into the tree. Must be consistent with previous
// contents.
insert(point: T): void;
// Remove a point from the tree by reference.
remove(point: T): void;
// Get an approximation of how unbalanced the tree is.
// The higher this number, the worse query performance will be.
// It indicates how many times worse it is than the optimal tree.
// Minimum is 1. Unreliable for small trees.
balanceFactor(): number;
}
These definitions were written by .
FAQs
TypeScript definitions for kd-tree-javascript
We found that @types/kd-tree-javascript 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.