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

brfs-htmlmin

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brfs-htmlmin - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

0

example/bundle.js

@@ -0,0 +0,0 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

@@ -0,0 +0,0 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

var fs = require('fs');
var html = fs.readFileSync(__dirname + '/doc.html', 'utf8');
console.log(html);

20

index.js

@@ -8,2 +8,9 @@ var staticModule = require('static-module');

var regexps = [
'ignoreCustomComments',
'customAttrAssign',
'customAttrSurround',
'customAttrCollapse'
];
module.exports = function(file, opts) {

@@ -22,2 +29,11 @@ if(/\.json$/.test(file)) return through();

Object.keys(opts.minify).forEach(function (key) {
if(~regexps.indexOf(key)) {
var value = opts.minify[key];
opts.minify[key] = Array.isArray(value) ?
value.map(asRegExp) :
asRegExp(value);
}
});
var vars = {

@@ -67,2 +83,6 @@ __filename: file,

}
function asRegExp(val) {
return (val instanceof RegExp) ? val : new RegExp(val);
}
};

4

package.json
{
"name": "brfs-htmlmin",
"version": "1.0.1",
"version": "1.1.0",
"description": "browserify fs.readFileSync() static html file inliner with html minifier",

@@ -29,3 +29,3 @@ "main": "index.js",

"dependencies": {
"html-minifier": "^0.6.8",
"html-minifier": "^0.7.2",
"quote-stream": "0.0.0",

@@ -32,0 +32,0 @@ "static-module": "^1.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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