parse-data-uri
parse a data uri into mime type and buffer
Last updated 10 years ago by jden .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install parse-data-uri 
SYNC missed versions from official npm registry.

parse-data-uri

parse a data uri into mime type and buffer

usage

var parseDataUri = require('parse-data-uri')

var dataUri = 'data:image/jpeg;base64,23423423...'

var parsed = parseDataUri(dataUri)

console.log(parsed)
// {
//   mimeType: 'image/jpeg',
//   data: Buffer < 00 00 00 ... > 
// }

api

###parseDataUri : ( dataUri: String ) => {mimeType: String, data: Buffer}

installation

$ npm install parse-data-uri

running the tests

From package root:

$ npm install
$ npm test

Special thanks to @tootallnate for writing data-uri-to-buffer

contributors

license

ISC. (c) MMXIV jden jason@denizac.org. See LICENSE.md

Current Tags

  • 0.2.0                                ...           latest (10 years ago)

2 Versions

  • 0.2.0                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |