aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/tilekeys.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/tilekeys.js b/utils/tilekeys.js
new file mode 100644
index 0000000..ffdf168
--- /dev/null
+++ b/utils/tilekeys.js
@@ -0,0 +1,2 @@
+// Gets keys from tiles, like the kind returned from tileUpdate or fetch
+module.exports = tiles => Object.keys(tiles).map(coord => coord.split(',').map(num => parseInt(num)));