data-uri-type

1.0.0 • Public • Published

data-uri-type Build Status

Get the mediatype of a data-uri.

Install

$ npm install --save data-uri-type

Usage

const dataUriType = require('data-uri-type');
 
dataUriType('data:image/png;base64,iVBORw0KGgo')
  .then(console.log)  // 'image/png'
  .catch(console.error);

API

dataUriType(input)

input

Type: string

A data-URI

License

MIT © Hemanth.HM

Package Sidebar

Install

npm i data-uri-type

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hemanth