We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d3745b commit d63fcc8Copy full SHA for d63fcc8
packages/metascraper/src/index.js
@@ -9,11 +9,12 @@ const loadHTML = require('./load-html')
9
const getData = require('./get-data')
10
11
module.exports = rules => {
12
- const lazyloader = loadRules(rules)
+ const loadedRules = loadRules(rules)
13
return async ({ url, html, rules: inlineRules } = {}) => {
14
- const loadedRules = await lazyloader
15
if (!isUrl(url)) throw new TypeError('You need to provide a valid url.')
16
- if (isEmpty(html)) { throw new TypeError('You need to provide a valid HTML markup.') }
+ if (isEmpty(html)) {
+ throw new TypeError('You need to provide a valid HTML markup.')
17
+ }
18
return getData({
19
url,
20
htmlDom: loadHTML(html),
0 commit comments