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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i data-uri-type

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hemanth