Socket
Socket
Sign inDemoInstall

remark-images

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-images - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

index.js
const isUrl = require('is-url')
const visit = require('unist-util-visit')
const isImgUrl = str => /\.(svg|png|jpg|jpeg)/.test(str)
module.exports = () => (tree, file) =>

@@ -8,3 +10,3 @@ visit(tree, 'text', node => {

if (!isUrl(text)) {
if (!isUrl(text) || !isImgUrl(text)) {
return

@@ -11,0 +13,0 @@ }

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

"author": "John Otander",
"version": "0.1.0",
"version": "0.1.1",
"main": "index.js",

@@ -8,0 +8,0 @@ "files": [

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