create-data-uri
Create a base64 data URI
Install
$ npm install --save create-data-uri
Usage
var createDataUri = //=> data:image/jpeg;base64,photo
API
createDataUri(type, data)
-> string
type
Required
Type: string
/ object
The mime type for the data. You can optionally pass a {type, charset}
object as well.
data
Required
Type: string
Base64 encoded data.
License
MIT © Ben Drucker