New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hexcoord

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexcoord - npm Package Compare versions

Comparing version
0.1.5
to
0.1.6
+12
-0
lib.js

@@ -206,4 +206,13 @@ // Generated code -- http://www.redblobgames.com/grids/hexagons/

function indexOfHex(hexes, hex) {
return hexes.reduce(function(cur, val, index) {
if cur is -1 and val.q is hex.q and val.r is hex.r then index else cur
}, -1);
}
function neighbors(hex1, hex2) {
return indexOfHex(hex_ring(hex1, 1), hex2) > -1);
}
// Tests

@@ -382,1 +391,4 @@

exports.polygon_corners = polygon_corners;
exports.indexOfHex = indexOfHex
exports.neighbors = neighbors
+1
-1

@@ -5,3 +5,3 @@ {

"description": "",
"version": "0.1.5",
"version": "0.1.6",
"license": "MIT",

@@ -8,0 +8,0 @@ "homepage": "http://www.redblobgames.com/grids/hexagons/",