Back to Popmotion

isPoint

packages/popcorn/docs/api/utilities/is-point.md

8.7.1301 B
Original Source

isPoint

Returns true if the provided value has an x and y property.

<TOC />

Import

javascript
import { isPoint } from '@popmotion/popcorn';

Usage

javascript
isPoint(0); // false
isPoint({ x: 0, y: 0 }); // true

Types

typescript
isPoint(v: any): boolean;