Socket
Socket
Sign inDemoInstall

parse-data-uri

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    parse-data-uri

parse a data uri into mime type and buffer


Version published
Weekly downloads
209K
decreased by-7.23%
Maintainers
1
Install size
13.2 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 26 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc