valid-data-url
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"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) |
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14669
15
101
79