Skip to main content

sameCursor

[
  true,
  false,
  false,
  true
]
import { sameCursor } from "@sportsdataverse/sdvplot";

const rim = { field: "shot_distance", value: 0.5 }; // the centre of the 0-1 ft bin
[
sameCursor(rim, { field: "shot_distance", value: 0.5 }), // a new object, the same value: true
sameCursor(rim, { field: "shot_distance", value: 1.5 }), // the next bin: false
sameCursor(rim, null), // the pointer left: false
sameCursor(null, null),
];

Tags: docstring · sameCursor. All sdvplot examples.