@metascraper/helpers 5.38.0 → 5.39.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 +1 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -115,8 +115,6 @@ const REGEX_LOCATION = /^[A-Z\s]+\s+[-—–]\s+/
115
115
 
116
116
  const REGEX_TITLE_SEPARATOR = /^[^|\-/•—]+/
117
117
 
118
- const TRUNCATE_MAX_LENGTH = 300
119
-
120
118
  const AUTHOR_MAX_LENGTH = 128
121
119
 
122
120
  const removeLocation = value => replace(value, REGEX_LOCATION, '')
@@ -253,7 +251,7 @@ const description = (value, opts) =>
253
251
 
254
252
  const getDescription = (
255
253
  str,
256
- { truncateLength = TRUNCATE_MAX_LENGTH, ellipsis = '…', ...opts } = {}
254
+ { truncateLength = Number.MAX_SAFE_INTEGER, ellipsis = '…', ...opts } = {}
257
255
  ) => {
258
256
  let truncated = str.slice(0, truncateLength)
259
257
  if (truncated.length < str.length) truncated = truncated.trim() + ellipsis
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.38.0",
5
+ "version": "5.39.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": "d83d0059ad1f8382747226923b945a054c95f609"
65
+ "gitHead": "de153b080df454a7130d0ae34a0deac277b8df8b"
66
66
  }