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

@flourish/pocket-knife

Package Overview
Dependencies
Maintainers
10
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flourish/pocket-knife - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

4

package.json
{
"name": "@flourish/pocket-knife",
"version": "0.3.2",
"version": "0.4.0",
"description": "Flourish module with handy tools",

@@ -32,2 +32,2 @@ "main": "pocket-knife.js",

}
}
}

@@ -0,1 +1,4 @@

### 0.4.0
* Recognise `data:` URIs in the `isUrl()` and `isImage()` functions
### 0.3.2

@@ -14,2 +17,2 @@ * Change `this` in `getTextWidth()`

### 0.1.0
* First version with isImage and isUrl functions
* First version with isImage and isUrl functions

@@ -12,3 +12,3 @@ var getTextWidth = (function() {

if (typeof string != "string") return false;
return string.match(/^https?:\/\/.+\.(jpg|jpeg|svg|png|gif|webp)$/i) != null;
return string.match(/^(https?:\/\/.+\.(jpg|jpeg|svg|png|gif|webp)$|data:image\/)/i) != null;
}

@@ -18,5 +18,5 @@

if (typeof string != "string") return false;
return string.match(/^https?:\/\//i) != null;
return string.match(/^(https?:\/\/|data:)/i) != null;
}
export { getTextWidth, isImage, isUrl }
export { getTextWidth, isImage, isUrl }
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