chore: lint

This commit is contained in:
karishmas6
2024-08-02 19:07:58 +05:30
parent 8540905192
commit 9b18293643

View File

@@ -132,12 +132,12 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
*/
// Wrap the entire function in an IIFE (Immediately Invoked Function Expression)
// and attach it to the window object
(function(window) {
(function (window) {
/**
* Returns a "scrape" result from the current page.
* @returns {Array<Object>} *Curated* array of scraped information (with sparse rows removed)
*/
window.scrape = function(selector = null) {
window.scrape = function (selector = null) {
/**
* **crudeRecords** contains uncurated rundowns of "scrapable" elements
* @type {Array<Object>}
@@ -188,7 +188,7 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
* @param {Object.<string, object[]>} lists The named lists of HTML elements.
* @returns {Array.<Object.<string, string>>}
*/
window.scrapeSchema = function (lists) {
window.scrapeSchema = function (lists) {
function omap(object, f, kf = (x) => x) {
return Object.fromEntries(
Object.entries(object)
@@ -230,7 +230,6 @@ window.scrapeSchema = function (lists) {
lists,
(listOfElements) => listOfElements.find((elem) => mbe.contains(elem))?.innerText,
));
}
}
})(window);