Skip to content

Commit 4ae4da0

Browse files
committed
fix k>3, add eslint
1 parent 9672ae9 commit 4ae4da0

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.eslintrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": [
3+
"eslint:recommended"
4+
],
5+
"env": {
6+
"browser": true,
7+
"node": true,
8+
"es6": true
9+
},
10+
"parserOptions": {
11+
"ecmaVersion": 2018,
12+
"sourceType": "module"
13+
},
14+
"rules": {
15+
"no-console": "warn",
16+
"max-len": [
17+
"warn",
18+
180,
19+
4
20+
]
21+
}
22+
}

ktree.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const ktree = k => {
9292
: {
9393
n,
9494
items: [],
95-
...keys.reduce((o, key) => ({ ...o, [key]: buildTree(depth, n + 1) }), {})
95+
...KEYS.reduce((o, key) => ({ ...o, [key]: buildTree(depth, n + 1) }), {})
9696
};
9797
getNeighbors = (decs, N) => {
9898
const nodes = [];

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ktree",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "Efficient tree search in k-dimensions",
55
"main": "dist/ktree.cjs.js",
66
"browser": "dist/ktree.umd.js",
@@ -41,6 +41,7 @@
4141
"color-name-list": "^3.45.0",
4242
"color-names": "^2.0.0",
4343
"color-tf": "^5.1.2",
44+
"eslint": "^4.19.1",
4445
"nyc": "^11.8.0",
4546
"rollup": "^0.59.2",
4647
"rollup-plugin-babel": "^4.0.0-beta.4"

0 commit comments

Comments
 (0)