Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

valid-data-url

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valid-data-url - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.bowerrc

1

bower.json
{
"name": "valid-data-url",
"version": "0.1.1",
"description": "Detect if a string is a data URL",

@@ -4,0 +5,0 @@ "main": "index.js",

<a name="0.1.1"></a>
### 0.1.1 (2016-05-09)
* remove trailing spaces in data part
<a name="0.1.0"></a>

@@ -3,0 +9,0 @@ ### 0.1.0 (2016-05-09)

2

index.js

@@ -6,4 +6,4 @@ 'use strict';

}
validDataUrl.regex = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+\=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9\!\$\&\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*\s*$/i;
validDataUrl.regex = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+\=[a-z0-9\-]+)?)?(;base64)?,([a-z0-9\!\$\&\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*?)\s*$/i;
module.exports = validDataUrl;
{
"name": "valid-data-url",
"version": "0.1.0",
"version": "0.1.1",
"description": "Detect if a string is a data URL",

@@ -5,0 +5,0 @@ "main": "index.js",

# Detect if a string is a data URL
[![Build Status](https://travis-ci.org/killmenot/valid-data-url.svg?branch=master)](https://travis-ci.org/killmenot/valid-data-url)
[![Dependency Status](https://gemnasium.com/badges/github.com/killmenot/valid-data-url.svg)](https://gemnasium.com/github.com/killmenot/valid-data-url)
[![npm version](https://badge.fury.io/js/valid-data-url.svg)](https://badge.fury.io/js/valid-data-url)
Based on [Brian Grinstead](https://github.com/bgrins)'s solution https://gist.github.com/bgrins/6194623

@@ -36,2 +40,3 @@

var validDataUrl = require('valid-data-url');
var isValid = validDataUrl('data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D'); // true

@@ -42,3 +47,3 @@ ```

The original author is Brian Grinstead[https://github.com/bgrins]
The original author is [Brian Grinstead](https://github.com/bgrins)

@@ -45,0 +50,0 @@

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