web-auto-extractor
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -9,2 +9,4 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _cheerio = require('cheerio'); | ||
@@ -56,10 +58,24 @@ | ||
if (idList.length === 0) { | ||
idList = Object.keys(items).filter(function (id) { | ||
return items[id].parentTypeId === null; | ||
}); | ||
// START SIDE EFFECT: ITEM PATH INFO | ||
idList.forEach(function (id, index) { | ||
items[id].path = path.concat(index); | ||
}); | ||
// END SIDE EFFECT: ITEM PATH INFO | ||
var _ret = function () { | ||
idList = Object.keys(items).filter(function (id) { | ||
return items[id].parentTypeId === null; | ||
}); | ||
// START SIDE EFFECT: ITEM PATH INFO | ||
idList.forEach(function (id, index) { | ||
items[id].path = path.concat([items[id].name, index]); | ||
}); | ||
// END SIDE EFFECT: ITEM PATH INFO | ||
var result = {}; | ||
var groupedIdListByName = _lodash2.default.groupBy(idList, function (id) { | ||
return items[id].name; | ||
}); | ||
Object.keys(groupedIdListByName).forEach(function (name) { | ||
result[name] = normalize(items, groupedIdListByName[name], path); | ||
}); | ||
return { | ||
v: result | ||
}; | ||
}(); | ||
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; | ||
} | ||
@@ -66,0 +82,0 @@ return idList.map(function (id, index) { |
{ | ||
"name": "web-auto-extractor", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Automatically extracts structured information from webpages", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
43266
14
1199
1