Skip to content

hemanth/data-uri-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Get the mediatype of a data-URI.

Resources

License

Stars

Watchers

Forks

Packages

No packages published