Socket
Socket
Sign inDemoInstall

@visx/point

Package Overview
Dependencies
0
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @visx/point

visx point


Version published
Weekly downloads
600K
increased by23.48%
Maintainers
4
Install size
6.62 kB
Created
Weekly downloads
 

Changelog

Source

v2.17.0 (2022-12-22)

:bug: Bug Fix
  • deps(scale): bump d3-interpolate and d3-scale #1578

:house: Internal

  • internal: migrate off nimbus #1609
:trophy: Contributors

Readme

Source

@visx/point

npm install --save @visx/point

A simple class to represent an x, y coordinate.

Example Usage

import { Point } from '@visx/point';

const point = new Point({ x: 2, y: 3 });
const { x, y } = point.value(); // Get the coords as an object
const [x, y] = point.toArray(); // or array

Methods

point.value()

Returns an { x, y } object with the x and y coordinates.

point.toArray()

Returns the coordinates as an array [x, y].

Keywords

FAQs

Last updated on 22 Dec 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc