data-uri-type
v1.0.0
Published
Get the mediatype of a data-uri
Downloads
2
Maintainers
Readme
data-uri-type
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