grid-neighbors-1d
Version:
Get the 8 closest neighbors of a cell in a 2d grid when flattened to a 1d array
61 lines (60 loc) • 1.4 kB
JSON
{
"name": "grid-neighbors-1d",
"version": "2.1.0",
"description": "Get the 8 closest neighbors of a cell in a 2d grid when flattened to a 1d array",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/phugh/grid-neighbors-1d.git"
},
"sideEffects": false,
"scripts": {
"prestart": "rimraf dist && eslint --fix && npm run build",
"build": "tsc"
},
"pre-commit": [ "prestart" ],
"keywords": [
"array",
"2d",
"1d",
"matrix",
"grid",
"neighbour",
"neighbor",
"neighbours",
"neighbors",
"compass",
"direction",
"game-of-life",
"automata",
"cellular-automata",
"cellular"
],
"author": {
"name": "Peter Hughes",
"email": "peter@phugh.es",
"url": "https://www.phugh.es"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/phugh/grid-neighbors-1d/issues"
},
"homepage": "https://github.com/phugh/grid-neighbors-1d#readme",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.48.0",
"rimraf": "^5.0.1",
"pre-commit": "^1.2.2",
"prettier": "^3.0.2",
"typescript": "^5.2.2"
}
}