Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fis3-deploy-html-inline-merge

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

fis3-deploy-html-inline-merge - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

17

index.js
'use strict';
var script = /<script(\s+type=["']text\/javascript["'])?>([\s\S]*?)<\/script>/g,
style = /<style(\s+type=["']text\/css["'])?>([\s\S]*?)<\/style>/g;
module.exports = function(opts, modified, total, next) {

@@ -9,7 +12,6 @@ modified.forEach(function(file) {

content = content.replace(/(<script(\s+type=["']text\/javascript["'])?>([\s\S]*?)<\/script>\s*){2,}/, function(str) {
var single = /<script(\s+type=["']text\/javascript["'])?>([\s\S]*?)<\/script>/g,
code = [],
content = content.replace(new RegExp('(' + script.source + '\s*){2,}', 'g'), function(str) {
var code = [],
match = null;
while (match = single.exec(str)) {
while (match = script.exec(str)) {
code.push(match[2]);

@@ -20,7 +22,6 @@ }

content = content.replace(/(<style(\s+type=["']text\/css["'])?>([\s\S]*?)<\/style>\s*){2,}/, function(str) {
var single = /<style(\s+type=["']text\/css["'])?>([\s\S]*?)<\/style>/g,
code = [],
content = content.replace(new RegExp('(' + style.source + '\s*){2,}', 'g'), function(str) {
var code = [],
match = null;
while (match = single.exec(str)) {
while (match = style.exec(str)) {
code.push(match[2]);

@@ -27,0 +28,0 @@ }

{
"name": "fis3-deploy-html-inline-merge",
"version": "0.0.1",
"version": "0.0.2",
"description": "fis3 合并html中的style/script inline标签",

@@ -5,0 +5,0 @@ "keywords": [

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