Comparing version 0.5.3 to 0.5.4
@@ -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
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
14478
7