Socket
Socket
Sign inDemoInstall

@dicebear/converter

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dicebear/converter - npm Package Compare versions

Comparing version 5.0.0-alpha.20 to 5.0.0-alpha.21

13

lib/core.js
import { getMimeType } from './utils/mime-type.js';
import { ensureSize } from './utils/svg.js';
export const toFormat = function (svg, format, exif) {
const blob = toBlob(svg, format, exif);
return {
toDataUri: async () => toDataUri(await blob),
toFile: async (name) => toFile(await blob, name),
toArrayBuffer: async () => (await blob).arrayBuffer(),
toDataUri: async () => {
return toDataUri(await toBlob(svg, format, exif));
},
toFile: async (name) => {
return toFile(await toBlob(svg, format, exif), name);
},
toArrayBuffer: async () => {
return (await toBlob(svg, format, exif)).arrayBuffer();
},
};

@@ -10,0 +15,0 @@ };

@@ -8,7 +8,12 @@ import { promises as fs } from 'node:fs';

export const toFormat = function (svg, format, exif) {
const blob = toBlob(svg, format, exif);
return {
toDataUri: async () => toDataUri(await blob),
toFile: async (name) => toFile(await blob, name),
toArrayBuffer: async () => (await blob).arrayBuffer(),
toDataUri: async () => {
return toDataUri(await toBlob(svg, format, exif));
},
toFile: async (name) => {
return toFile(await toBlob(svg, format, exif), name);
},
toArrayBuffer: async () => {
return (await toBlob(svg, format, exif)).arrayBuffer();
},
};

@@ -15,0 +20,0 @@ };

@@ -1,3 +0,3 @@

export declare type ToFormat = (svg: string, format: Format, exif?: Exif) => BinaryResult;
export interface BinaryResult {
export declare type ToFormat = (svg: string, format: Format, exif?: Exif) => Result;
export interface Result {
toDataUri(): Promise<string>;

@@ -4,0 +4,0 @@ toFile(name: string): Promise<void>;

{
"name": "@dicebear/converter",
"version": "5.0.0-alpha.20",
"version": "5.0.0-alpha.21",
"description": "SVG Converter for DiceBear",

@@ -56,3 +56,3 @@ "keywords": [

},
"gitHead": "6b1c2bd64294365be21d0a133a362ede5ed62b5a"
"gitHead": "40b7190a19ba3c6c355178f1ae6c422229634e06"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc