Skip to content

Commit

Permalink
cleaned output from details below city level
Browse files Browse the repository at this point in the history
  • Loading branch information
massimocandela committed May 23, 2021
1 parent 5885118 commit aa70ceb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ export default class Finder {
.then(() => {
this._persistCacheIndex();
return [].concat.apply([], out);
})
.then(data => {
if (!this.params.includeZip) {
data.forEach(i => i.zip = null);
}

return data;
});
};

Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ const params = yargs
.nargs('b', 0)
.describe('b', 'Use bulk whois data for ARIN: https://www.arin.net/reference/research/bulkwhois/')

// .alias('z', 'include-zip')
// .nargs('z', 0)
// .describe('z', 'Zip codes are deprecated in geofeed and by default are excluded from the output.')

.alias('i', 'include')
.nargs('i', 1)
.default('i', 'ripe,apnic,lacnic,afrinic,arin')
Expand All @@ -43,6 +47,7 @@ const params = yargs
const options = {
defaultCacheDays: 7,
arinBulk: params.b,
includeZip: params.z || false,
include: ((params.i) ? params.i : "ripe,apnic,lacnic,afrinic,arin").split(","),
output: params.o || "result.csv",
test: params.t || null,
Expand Down

0 comments on commit aa70ceb

Please sign in to comment.