New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

istatic

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istatic - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

13

lib/uglify.js

@@ -6,9 +6,7 @@ var uglifycss = require('uglifycss');

var reg_log = /_log\(.+?\)/g;
module.exports = {
js: function uglify(str, opt) {
// remove debug info by default
str = str.replace(opt && opt.removals || reg_log, '');
if (opt) delete opt.removals;
if (opt && opt.filter) {
str = opt.filter(str);
}
var ast = jsp.parse(str);

@@ -20,5 +18,4 @@ ast = pro.ast_mangle(ast);

css: function uglifycss(str, opt) {
if (opt && opt.removals) {
str.replace(opt.removals, '');
delete opt.removals;
if (opt && opt.filter) {
str = opt.filter(str);
}

@@ -25,0 +22,0 @@ return uglifycss.processString(str, opt);

{
"name": "istatic",
"version": "0.0.3",
"version": "0.0.4",
"homepage": "http://github.com/ktmud/express-istatic",
"description": "Add compressed inline css and scripts to your html, but write them as seperated files.",
"keywords": [ "express", "static files include", "compression", "minify" ],
"contributors": [
"ktmud <jyyjcc@gmail.com> (http://ktmud.com)"
],
"author": "ktmud <jyyjcc@gmail.com> (http://ktmud.com)",
"main": "./lib/istatic",

@@ -14,3 +12,3 @@ "repository": "git@github.com/ktmud/express-istatic.git",

"less": ">= 1.0",
"stylus": ">= 1.0",
"stylus": ">= 0.1",
"uglify-js": ">= 1.0",

@@ -17,0 +15,0 @@ "uglifycss": ">= 0.0.5"

@@ -52,6 +52,4 @@ # Inline Static Files for express / connect / nodejs

For css and js options, you can define an `js.removals` or `css.removals`, to remove some contents (like `console.log()`) before compressing. This will make the inline css/script even more smaller, but still keep the maitainability of the code.
For css and js options, you can define an `js.filter` or `css.filter`, to do some filtering(like remove `console.log()`) before compressing.
By default, there's only `removals` for js, and it's an RegExp: ``/_log\(.+?\)/g``.
## Use inside template:

@@ -58,0 +56,0 @@

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