🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

svg64

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg64 - npm Package Compare versions

Comparing version

to
2.0.0

dist/svg64.cjs

22

package.json
{
"name": "svg64",
"version": "1.2.0",
"version": "2.0.0",
"description": "Convert SVG to base64 anywhere",

@@ -18,3 +18,12 @@ "keywords": [

"funding": "https://github.com/sponsors/scriptex",
"main": "dist/svg64.js",
"type": "module",
"source": "src/svg64.ts",
"exports": {
"require": "./dist/svg64.cjs",
"default": "./dist/svg64.modern.js"
},
"main": "./dist/svg64.cjs",
"types": "./dist/svg64.d.ts",
"module": "./dist/svg64.module.js",
"unpkg": "./dist/svg64.umd.js",
"repository": {

@@ -25,12 +34,11 @@ "type": "git",

"scripts": {
"js": "mkdir dist && uglifyjs src/svg64.js -o dist/svg64.js",
"clean": "rm -rf dist && rm -rf demo/dist",
"copy": "cp -r dist demo",
"demo": "node ./demo/scripts/node.js",
"build": "yarn clean && yarn js && yarn copy"
"demo": "node ./demo/scripts/node.mjs",
"build": "microbundle && yarn copy",
"start": "microbundle watch"
},
"dependencies": {},
"devDependencies": {
"uglify-js": "3.17.2"
"microbundle": "0.15.1"
}
}

@@ -58,5 +58,7 @@ [![Travis CI](https://travis-ci.com/scriptex/svg64.svg?branch=master)](https://travis-ci.com/scriptex/svg64)

### In a browser:
### In a browser
```javascript
import svg64 from 'svg64'; // or use window.svg64.default
// This is your SVG DOM element

@@ -69,3 +71,3 @@ const svg = document.getElementById('svg');

// This is your SVG in base64 representation
const base64fromSVG = window.svg64(svg);
const base64fromSVG = svg64(svg);

@@ -76,3 +78,3 @@ // Add the base64 image as a background to your element

### In Node:
### In Node

@@ -97,3 +99,3 @@ ```javascript

Check it out [here](https://sv64.atanas.info)
Check it out [here](https://svg64.atanas.info)

@@ -100,0 +102,0 @@ There is a simple demo illustrating how to use the SVG64 module in NodeJS.