@ip-pilot/ippql-helpers
v1.0.2
Published
A demo package that allows you to sort, slice and get an array of strings with a provided prop and value from an IPPQL response.
Downloads
3
Readme
ippql-helpers
Gettin started
- Install the package
npm i ippql-helpers
- How to use it in your file (ex: paste it in an index.js file and then run node index.js):
const { ippqlHelpers } = require('ippql-helpers');
const entries = [
{
'herzog-fiesser-partner-de': 856,
data_1: [
{
foreign_rep_name: 'HERZOG FIESSER & PARTNER',
foreign_rep_country: 'DE',
},
],
},
{
'3m-innovative-properties-co-us': 2387,
data_1: [
{
foreign_rep_name: '3M INNOVATIVE PROPERTIES CO',
foreign_rep_country: 'US',
},
],
},
];
const sortedAndSlicedEntries = ippqlHelpers.sortAndSliceIppqlResults(entries, 3)
const formattedCountries = ippqlHelpers.getFormattedCountries(sortedAndSlicedEntries, 'foreign_rep_country')
Built with
Company
IP Pilot: