data-uri-utils

1.0.8 • Public • Published

data-uri-utils

Last version Coverage Status NPM Status

A set of functions for manipuliating data URIs.

Install

$ npm install data-uri-utils --save

Usage

const dataUri = require('data-uri-utils')

const uri = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='

dataUri.normalize(uri)
dataUri.toBuffer(uri).byteLength // => 89
dataUri.test(uri) // => true
dataUri.exec(uri)[2] // => 'image/png'

License

data-uri-utils © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats

Readme

Keywords

Package Sidebar

Install

npm i data-uri-utils

Weekly Downloads

13,972

Version

1.0.8

License

MIT

Unpacked Size

5.5 kB

Total Files

4

Last publish

Collaborators

  • kikobeats