UNPKG
winnow
Version:
latest (2.6.0)
2.6.0
2.5.2
2.5.1
2.5.0
2.4.0
2.3.0
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.1
2.1.0
2.0.2
2.0.1
2.0.0
1.16.13
1.16.12
1.16.11
1.16.10
1.16.9
1.16.8
1.16.7
1.16.6
1.16.5
1.16.4
1.16.3
1.16.2
1.16.1
1.16.0
1.15.3
1.15.2
1.15.1
1.15.0
1.14.0
1.13.0
1.12.7
1.12.6
1.12.5
1.12.4
1.12.3
1.12.2
1.12.1
1.12.0
1.11.2
1.11.1
1.11.0
1.10.7
1.10.6
1.10.5
1.10.4
1.10.3
1.10.2
1.10.1
1.10.0
1.9.0
1.8.8
1.8.7
1.8.6
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.1
1.7.0
1.6.0
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.2
1.4.1
1.4.0
1.3.0
1.2.2
1.2.1
1.2.0
1.1.0
1.0.1
1.0.0
1.0.0-alpha
Apply sql-like filters to GeoJSON
github.com/koopjs/winnow
koopjs/winnow
winnow
/
lib
/
filter-and-transform
/
transforms
/
to-hash.js
8 lines
(6 loc)
•
159 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
function
toHash
(
value, hashStore = {}
) {
if
(hashStore[value]) hashStore[value]++
else
hashStore[value] =
1
return
hashStore }
module
.
exports
= toHash