Last active
January 29, 2019 22:05
-
-
Save kaaloo/c83cac2ca8a9e278bf08afacb64d57f7 to your computer and use it in GitHub Desktop.
js I ported
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const path = require('path') | |
const { featureCollection } = require('@turf/helpers') | |
const Fuse = require('fuse.js') | |
const streetAddressesGeoJSON = featureCollection(JSON.parse(fs.readFileSync(path.join(__dirname, 'adresses.json')))) | |
const streetAddressesFuse = new Fuse(streetAddressesGeoJSON.features.features, { | |
shouldSort: true, | |
keys: [ | |
"properties.adresse" | |
] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment