Socket
Socket
Sign inDemoInstall

get-top-countries-of-reps-hubspot

Package Overview
Dependencies
15
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

3

package.json
{
"name": "get-top-countries-of-reps-hubspot",
"version": "1.0.1",
"version": "1.0.2",
"description": "A demo package that allows you to match retrieve top countries of reps from IP Pilot's database and save it for every company in your Hubspot account.",

@@ -21,4 +21,5 @@ "main": "index.js",

"get-all-hubspot-companies": "^1.0.6",
"ippql-helpers": "^1.0.1",
"populate-hubspot-companies-with-id": "^1.0.3"
}
}
'use strict';
const { axiosFetcher } = require('axios-fetcher');
const { ippqlHelpers } = require('ippql-helpers');
const { getFormattedCountries, sortAndSliceIppqlResults } = ippqlHelpers;

@@ -26,3 +28,3 @@ const query = `query filingsRequest($params: IPPQL) {

filters: { prosecution_date: { from: '1980-01-01' }, applicant_url: [url] },
aggregations: { field: 'rep_url', data: { fields: ['rep_name', 'rep_country'] }, size: 3 },
aggregations: { field: 'rep_url', data: { fields: ['rep_name', 'rep_country'] }, size: 30 },
},

@@ -47,7 +49,6 @@ };

) {
const entries = result.data.filingsRequest.rep_url;
temporaryCompany.topCountriesOfReps.push({
name,
countries: result.data.filingsRequest.rep_url
.map((el) => el.data_1 && el.data_1.length && `${el.data_1[0].rep_country} = ${el[Object.keys(el)[0]]}`)
.join(', '),
countries: getFormattedCountries(sortAndSliceIppqlResults(entries, 3), 'rep_country'),
});

@@ -54,0 +55,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc