New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@metascraper/helpers

Package Overview
Dependencies
Maintainers
1
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metascraper/helpers - npm Package Compare versions

Comparing version 5.4.6 to 5.4.7

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [5.4.7](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-helpers/compare/v5.4.6...v5.4.7) (2019-06-20)
**Note:** Version bump only for package @metascraper/helpers
## [5.4.6](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-helpers/compare/v5.4.5...v5.4.6) (2019-06-19)

@@ -8,0 +16,0 @@

45

index.js

@@ -19,3 +19,4 @@ 'use strict'

toLower,
trim
trim,
invoke
} = require('lodash')

@@ -240,2 +241,36 @@

const image = url
const logo = url
const video = (value, opts) => {
const urlValue = url(value, opts)
return isVideoUrl(urlValue) && urlValue
}
const audio = (value, opts) => {
const urlValue = url(value, opts)
return isAudioUrl(urlValue) && urlValue
}
const validator = {
date,
audio,
author,
video,
title,
publisher,
image,
logo,
url,
description,
lang
}
const createValidator = fn => ({ from, to = from }) => async args => {
const data = await fn(args)
const value = get(data, from)
return invoke(validator, to, value)
}
module.exports = {

@@ -269,3 +304,9 @@ $filter,

titleize,
url
url,
image,
logo,
audio,
video,
validator,
createValidator
}

6

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-helpers",
"version": "5.4.6",
"version": "5.4.7",
"main": "index.js",

@@ -42,2 +42,3 @@ "repository": {

"cheerio": "latest",
"coveralls": "latest",
"mocha": "latest",

@@ -56,2 +57,3 @@ "nyc": "latest",

"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test": "NODE_PATH=.. TZ=UTC NODE_ENV=test nyc mocha test"

@@ -65,3 +67,3 @@ },

},
"gitHead": "ef95e3cda9739b2add317bbea9c68087acc79ab3"
"gitHead": "d60b4799f23dd72b096bbf8a2635c324ce14c60a"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc