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

dauria

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dauria - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

.jshintrc

12

dauria.js

@@ -1,1 +0,11 @@

console.log('Initial piece of the Dauria module.');
var Dauria = function(){
if (!(this instanceof Dauria)) return new Dauria();
};
Dauria.prototype.getBase64DataURI = function(sourceBuffer, MIME){
if( typeof MIME === 'undefined' ) MIME = 'application/octet-stream';
return 'data:' + MIME + ';base64,' + sourceBuffer.toString('base64');
};
module.exports = new Dauria();
{
"name": "dauria",
"main": "dauria.js",
"version": "0.0.1",
"version": "1.0.0",
"description": "Node.js module for Data URI applications. It performs conversions between Node.js Buffers and RFC2397-compliant Data URIs.",

@@ -12,3 +12,7 @@ "keywords": ["data uri", "data url", "data uris", "data urls", "rfc2397", "rfc 2397"],

"url": "https://github.com/Mithgol/dauria.git"
},
"scripts": {
"pretest": "jshint dauria.js test/",
"test": "mocha --reporter spec --timeout 60s"
}
}

@@ -1,7 +0,43 @@

This Node.js module for **Data�URI a**pplications is called __Dauria__ (after a�part of [Transbaikal](http://en.wikipedia.org/wiki/Transbaikal)).
This Node.js module for <b>Da</b>ta <b>URI a</b>pplications is called **Dauria** (after a part of [Transbaikal](http://en.wikipedia.org/wiki/Transbaikal)).
It performs conversions between Node.js Buffers and [RFC2397-compliant](http://tools.ietf.org/html/rfc2397) Data�URIs.
It performs conversions between Node.js Buffers and [RFC2397-compliant](http://tools.ietf.org/html/rfc2397) Data URIs.
## Installing Dauria
[![(npm package version)](https://nodei.co/npm/dauria.png?downloads=true)](https://npmjs.org/package/dauria) [![(a histogram of downloads)](https://nodei.co/npm-dl/dauria.png?months=3)](https://npmjs.org/package/dauria)
* Latest packaged version: `npm install dauria`
* Latest githubbed version: `npm install https://github.com/Mithgol/dauria/tarball/master`
The npm package does not contain the tests, they're published on GitHub only.
You may visit https://github.com/Mithgol/dauria#readme occasionally to read the latest `README` because the package's version is not planned to grow after changes when they happen in `README` only. (And `npm publish --force` is [forbidden](http://blog.npmjs.org/post/77758351673/no-more-npm-publish-f) nowadays.)
## Using Dauria
When you `require()` the installed module, you get an object that has the following method:
### getBase64DataURI(sourceBuffer, MIME)
Returns a string containing the `data:...` URI that represent the given source Buffer in the base64-encoded form.
An optional second parameter (`MIME`) suggests the MIME type of the given Buffer. If the parameter is not given, `'application/octet-stream'` is used.
## Testing Dauria
The tests are not included in the npm package of the module (to keep it small). Use the version from GitHub.
It is necessary to install [Mocha](http://visionmedia.github.io/mocha/) and [JSHint](http://jshint.com/) for testing.
* You may install Mocha globally (`npm install mocha -g`) or locally (`npm install mocha` in the directory of Dauria).
* You may install JSHint globally (`npm install jshint -g`) or locally (`npm install jshint` in the directory of Dauria).
After that you may run `npm test` (in the directory of Dauria).
## License
MIT license (see the `LICENSE` file).
MIT license (see the `LICENSE` file), with the following exception:
* The file `test/red-dot-5px.png` is taken from Wikipedia where it has been [released into the public domain.](http://en.wikipedia.org/wiki/File%3aRed-dot-5px.png)
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