
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
extra-grid
Advanced tools
npm install --save extra-grid
# or
yarn add extra-grid
enum Direction {
Up
, Down
, Left
, Right
, UpLeft
, UpRight
, DownLeft
, DownRight
}
function reverseDirection(direction: Direction): Direction
function getManhattanDistance(a: [number, number], b: [number, number]): number
function getNewCoordinate(
x: number
, y: number
, direction: Direction
, distance: number
): [x: number, y: number]
function isVonNeumannNeighborOf(
subject: [number, number]
, object: [number, number]
, range: number = 1
): boolean
function isMooreNeighborOf(
subject: [number, number]
, object: [number, number]
, range: number = 1
): boolean
class Grid<T> {
readonly width: number
readonly height: number
constructor(
width: number
, height: number
, createCell: (x: number, y: number) => T
)
has(x: number, y: number): boolean
get(x: number, y: number): T
tryGet(x: number, y: number): T | null
set(x: number, y: number, value: T): void
getNewCoordinate(
x: number
, y: number
, direction: Direction
, distance: number = 1
): { x: number; y: number } | null
coordinates(
start?: [x: number, y: number] = [0, 0]
, end?: [x: number, y: number] = [this.width, this.height]
): IterableIterator<[x: number, y: number]>
coordinatesRowMajor(
start?: [x: number, y: number] = [0, 0]
, end?: [x: number, y: number] = [this.width, this.height]
): IterableIterator<[x: number, y: number]>
coordinatesColumnMajor(
start?: [x: number, y: number] = [0, 0]
, end?: [x: number, y: number] = [this.width, this.height]
): IterableIterator<[x: number, y: number]>
vonNeumannNeighborhoodCoordinates(
x: number
, y: number
, range: number = 1
): IterableIterator<[x: number, y: number]>
vonNeumannNeighborhoodCoordinatesRowMajor(
x: number
, y: number
, range: number = 1
): IterableIterator<[x: number, y: number]>
vonNeumannNeighborhoodCoordinatesColumnMajor(
x: number
, y: number
, range: number = 1
): IterableIterator<[x: number, y: number]>
mooreNeighborhoodCoordinates(
x: number
, y: number
, range: number = 1
): IterableIterator<[x: number, y: number]>
mooreNeighborhoodCoordinatesRowMajor(
x: number
, y: number
, range: number = 1
): IterableIterator<[x: number, y: number]>
mooreNeighborhoodCoordinatesColumnMajor(
x: number
, y: number
, range: number = 1
): IterableIterator<[x: number, y: number]>
}
FAQs
```sh npm install --save extra-grid # or yarn add extra-grid ```
We found that extra-grid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.