web-auto-extractor
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -7,12 +7,6 @@ 'use strict'; | ||
var _lodash = require('lodash'); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = function ($) { | ||
var metatagsData = {}; | ||
$('meta').each(function (index, elem) { | ||
var nameKey = _lodash2.default.find(_lodash2.default.keys(elem.attribs), function (attr) { | ||
var nameKey = Object.keys(elem.attribs).find(function (attr) { | ||
return ['name', 'property', 'itemprop'].indexOf(attr) !== -1; | ||
@@ -19,0 +13,0 @@ }); |
@@ -11,6 +11,2 @@ 'use strict'; | ||
var _lodash = require('lodash'); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -135,13 +131,11 @@ | ||
if (tag === TYPE) { | ||
(function () { | ||
var scope = scopes.pop(); | ||
if (!scope['@context']) { | ||
delete scope['@context']; | ||
var scope = scopes.pop(); | ||
if (!scope['@context']) { | ||
delete scope['@context']; | ||
} | ||
Object.keys(scope).forEach(function (key) { | ||
if (Array.isArray(scope[key]) && scope[key].length === 1) { | ||
scope[key] = scope[key][0]; | ||
} | ||
Object.keys(scope).forEach(function (key) { | ||
if (_lodash2.default.isArray(scope[key]) && scope[key].length === 1) { | ||
scope[key] = scope[key][0]; | ||
} | ||
}); | ||
})(); | ||
}); | ||
} else if (tag === PROP) { | ||
@@ -148,0 +142,0 @@ textForProp = false; |
{ | ||
"name": "web-auto-extractor", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Automatically extracts structured information from webpages", | ||
@@ -20,4 +20,3 @@ "main": "dist/index.js", | ||
"cheerio": "^0.22.0", | ||
"htmlparser2": "^3.9.1", | ||
"lodash": "^4.12.0" | ||
"htmlparser2": "^3.9.1" | ||
}, | ||
@@ -24,0 +23,0 @@ "devDependencies": { |
3
16105
247
- Removedlodash@^4.12.0
- Removedlodash@4.17.21(transitive)