Extracts files composing a shapefile from a .zip archive into a temporary directory and returns the path to the .shp
file.
$ npm install -g @mapbox/shapefile-fairy
In shell scripts
# exit 1 on failure, exit 0 on success and prints output path to stdout
$ shapefile-fairy /path/to/zipped/shapefile.zip
In JavaScript
var shpFairy = require('@mapbox/shapefile-fairy');
shpFairy('/path/to/zipped/shapefile.zip', function(err, output) {
if (err) return console.error(err);
doSomethingWith(output);
});