Socket
Socket
Sign inDemoInstall

css-b64-images

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-b64-images - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

24

lib/css-b64-images.js

@@ -8,13 +8,13 @@ var fs = require('fs'),

mediatypes = {
'eot' : 'application/vnd.ms-fontobject',
'gif' : 'image/gif',
'ico' : 'image/vnd.microsoft.icon',
'jpg' : 'image/jpeg',
'jpeg' : 'image/jpeg',
'otf' : 'application/x-font-opentype',
'png' : 'image/png',
'svg' : 'image/svg+xml',
'ttf' : 'application/x-font-ttf',
'webp' : 'image/webp',
'woff' : 'application/x-font-woff'
'.eot' : 'application/vnd.ms-fontobject',
'.gif' : 'image/gif',
'.ico' : 'image/vnd.microsoft.icon',
'.jpg' : 'image/jpeg',
'.jpeg' : 'image/jpeg',
'.otf' : 'application/x-font-opentype',
'.png' : 'image/png',
'.svg' : 'image/svg+xml',
'.ttf' : 'application/x-font-ttf',
'.webp' : 'image/webp',
'.woff' : 'application/x-font-woff'
};

@@ -73,3 +73,3 @@

if(err) return cb(err, css);
var ext = imagePath.substr(imagePath.lastIndexOf('.') + 1);
var ext = Path.extname(imagePath);
var newCss = css.replace(imageUrl, 'data:' + mediatypes[ext] + ';base64,' + img);

@@ -76,0 +76,0 @@ cb(null, newCss);

@@ -5,3 +5,3 @@ {

"description": "Base64 images in your css",
"version": "0.2.2",
"version": "0.2.3",
"main": "lib/css-b64-images.js",

@@ -8,0 +8,0 @@ "bin": "bin/css-b64-images",

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