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

datauri

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datauri - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

2

lib/datauri/api.js

@@ -38,3 +38,3 @@ /*

handler(null, this.content, this);
handler.call(this, null, this.content, this);

@@ -41,0 +41,0 @@ return;

{
"name": "datauri",
"version": "0.5.3",
"description": "A simple Data URI scheme generator",
"version": "0.5.4",
"description": "Data-URI scheme tools and generators",
"main": "datauri.js",
"scripts": {
"test": "make test"
"test": "make ci"
},

@@ -42,4 +42,12 @@ "dependencies": {

"jshint": "~2.4.3",
"sinon": "~1.8.1"
"sinon": "~1.8.1",
"mocha-lcov-reporter": "0.0.1",
"blanket": "~1.1.6",
"coveralls": "~2.8.0"
},
"config": {
"blanket": {
"pattern": "datauri/lib/"
}
}
}

@@ -1,2 +0,2 @@

datauri [![Build Status](https://secure.travis-ci.org/heldr/datauri.png?branch=master)](http://travis-ci.org/heldr/datauri) [![NPM version](https://badge.fury.io/js/datauri.png)](http://badge.fury.io/js/datauri)
datauri [![Build Status](https://secure.travis-ci.org/heldr/datauri.png?branch=master)](http://travis-ci.org/heldr/datauri) [![Coverage Status](https://coveralls.io/repos/heldr/datauri/badge.png)](https://coveralls.io/r/heldr/datauri) [![NPM version](https://badge.fury.io/js/datauri.png)](http://badge.fury.io/js/datauri)
=======

@@ -70,10 +70,10 @@

```js
dUri.on('encoded', function (content, datauri) {
dUri.on('encoded', function (content) {
console.log(content); //=> "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
console.log(datauri.mimetype); //=> "image/png"
console.log(datauri.base64); //=> "iVBORw0KGgoAAAANSUhEUgAA..."
console.log(datauri.getCSS()); //=> "\n.case {\n background: url('data:image/png;base64,iVBORw..."
console.log(datauri.getCSS("myClass")); //=> "\n.myClass {\n background: url('data:image/png;base64,iVBORw..."
console.log(this.mimetype); //=> "image/png"
console.log(this.base64); //=> "iVBORw0KGgoAAAANSUhEUgAA..."
console.log(this.getCSS()); //=> "\n.case {\n background: url('data:image/png;base64,iVBORw..."
console.log(this.getCSS("myClass")); //=> "\n.myClass {\n background: url('data:image/png;base64,iVBORw..."
})

@@ -90,3 +90,3 @@ .on('error', function (content) {

DataURI('test/myfile.png', function (err, content, datauri) {
DataURI('test/myfile.png', function (err, content) {
if (err) {

@@ -98,6 +98,6 @@ throw err;

console.log(datauri.mimetype); //=> "image/png"
console.log(datauri.base64); //=> "iVBORw0KGgoAAAANSUhEUgAA..."
console.log(datauri.getCSS()); //=> "\n.case {\n background: url('data:image/png;base64,iVBORw..."
console.log(datauri.getCSS("myClass")); //=> "\n.myClass {\n background: url('data:image/png;base64,iVBORw..."
console.log(this.mimetype); //=> "image/png"
console.log(this.base64); //=> "iVBORw0KGgoAAAANSUhEUgAA..."
console.log(this.getCSS()); //=> "\n.case {\n background: url('data:image/png;base64,iVBORw..."
console.log(this.getCSS("myClass")); //=> "\n.myClass {\n background: url('data:image/png;base64,iVBORw..."
});

@@ -104,0 +104,0 @@

Sorry, the diff of this file is not supported yet

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