aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-12-18 23:07:18 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-12-18 23:07:18 -0500
commit966685a9035bf7780805482e07d0822827c7dda8 (patch)
tree236093de55dfce3562e300f435172890415f9123 /utils
parenteb521a09fb44de23808653adbb6f0ede0fa5e9e0 (diff)
added tilekeys util
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)));