File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ const debug = require('debug-logfmt')('metascraper:get-data')
44const { findRule, has } = require ( '@metascraper/helpers' )
55
66const getData = async ( { rules, ...props } ) => {
7- const data = await Promise . all (
7+ const data = { }
8+
9+ await Promise . all (
810 rules . map ( async ( [ propName , innerRules ] ) => {
911 const duration = debug . duration ( )
1012 let normalizedValue = null
@@ -26,11 +28,11 @@ const getData = async ({ rules, ...props }) => {
2628 duration (
2729 `${ propName } =${ normalizedValue } rules=${ innerRules . length } status=${ status } `
2830 )
29- return [ propName , normalizedValue ]
31+ data [ propName ] = normalizedValue
3032 } )
3133 )
3234
33- return Object . fromEntries ( data )
35+ return data
3436}
3537
3638module . exports = getData
You can’t perform that action at this time.
0 commit comments