gatsby-source-hire-with-google
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -24,3 +24,3 @@ "use strict"; | ||
function getJob(_x, _x2) { | ||
function getJob(_x) { | ||
return _getJob.apply(this, arguments); | ||
@@ -30,3 +30,3 @@ } | ||
function _getJob() { | ||
_getJob = _asyncToGenerator(function* (jobUrl, options) { | ||
_getJob = _asyncToGenerator(function* (replaceDivs) { | ||
const response = yield _axios.default.get(jobUrl); | ||
@@ -43,3 +43,3 @@ | ||
location: $(jobLocationSelector).text(), | ||
content: options.replaceDivs ? content.replace(/div>/g, 'p>') : content | ||
content: replaceDivs ? content.replace(/div>/g, 'p>') : content | ||
}; | ||
@@ -50,3 +50,3 @@ }); | ||
function getJobs(_x3) { | ||
function getJobs(_x2) { | ||
return _getJobs.apply(this, arguments); | ||
@@ -67,3 +67,3 @@ } | ||
}).get(); | ||
return yield Promise.all(jobLinks.map(l => getJob(l, options))); | ||
return yield Promise.all(jobLinks.map(l => getJob(replaceDivs))); | ||
}); | ||
@@ -98,5 +98,5 @@ return _getJobs.apply(this, arguments); | ||
return function (_x4, _x5) { | ||
return function (_x3, _x4) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); |
{ | ||
"name": "gatsby-source-hire-with-google", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Gatsby source plugin for loading job openings from hire.withgoogle.com", | ||
@@ -5,0 +5,0 @@ "main": "gatsby-node.js", |
@@ -13,3 +13,3 @@ import crypto from 'crypto' | ||
async function getJob(jobUrl, options) { | ||
async function getJob(replaceDivs) { | ||
const response = await axios.get(jobUrl) | ||
@@ -25,3 +25,3 @@ const $ = cheerio.load(response.data); | ||
location: $(jobLocationSelector).text(), | ||
content: options.replaceDivs ? content.replace(/div>/g,'p>') : content | ||
content: replaceDivs ? content.replace(/div>/g,'p>') : content | ||
} | ||
@@ -37,3 +37,3 @@ } | ||
return await Promise.all(jobLinks.map(l => getJob(l, options))) | ||
return await Promise.all(jobLinks.map(l => getJob(replaceDivs))) | ||
} | ||
@@ -40,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8926