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

hotloader

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hotloader - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

8

dist/index.js

@@ -30,3 +30,9 @@ 'use strict';

if (err) return console.error(err);
socket.emit('html', html.toString().split('\n').slice(1).join('\n'));
var re = /<!DOCTYPE html>/;
var doctype = re.exec(html);
var cleanHtml = doctype ? html.slice(0, doctype.lastIndex) + html.slice(doctype.lastIndex + 15) : html;
socket.emit('html', cleanHtml);
});

@@ -33,0 +39,0 @@ };

2

package.json
{
"name": "hotloader",
"version": "1.1.0",
"version": "1.1.1",
"description": "simple lib for fast html hotloading",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -35,9 +35,13 @@ const fs = require('fs')

if (err) return console.error(err)
const re = /<!DOCTYPE html>/
const doctype = re.exec(html)
const cleanHtml = doctype
? html.slice(0, doctype.lastIndex) + html.slice(doctype.lastIndex + 15)
: html
socket.emit(
'html',
html
.toString()
.split('\n')
.slice(1)
.join('\n')
cleanHtml
)

@@ -44,0 +48,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