@metascraper/helpers 5.37.1 → 5.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -340,11 +340,10 @@ memoizeOne.EqualityUrlAndHtmlDom = (newArgs, oldArgs) =>
340
340
  const jsonld = memoizeOne(
341
341
  $ =>
342
342
  $('script[type="application/ld+json"]')
343
- .map(function () {
343
+ .map((_, element) => {
344
344
  try {
345
- const el = $(this)
345
+ const el = $(element)
346
346
  const json = JSON.parse($(el).contents().text())
347
-
348
347
  const { '@graph': graph, ...props } = json
349
348
  if (!graph) return json
350
349
  return graph.map(item => ({ ...props, ...item }))
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@metascraper/helpers",
3
3
  "description": "Collection of helper functions used by metascraper",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-helpers",
5
- "version": "5.37.1",
5
+ "version": "5.38.0",
6
6
  "main": "index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "5b969c5c306acda8f10503cc6da472493dd044f7"
65
+ "gitHead": "d83d0059ad1f8382747226923b945a054c95f609"
66
66
  }