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

@dreamworld/web-util

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreamworld/web-util - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2-first-second-line-beetween-space-is-not-removed.1

8

htmlTrim.js

@@ -14,5 +14,5 @@ import textToHtml from './textToHtml';

var children = Array.from(html.children || []);
var childNodes = Array.from(html.childNodes || []);
var bRemoveChild = true;
children.forEach(el => {
childNodes.forEach(el => {
if(bRemoveChild) {

@@ -66,6 +66,6 @@ if(el.textContent.trim() === "") {

var children = Array.from(html.children || []).reverse();
var childNodes = Array.from(html.childNodes || []).reverse();
var bRemoveChild = true;
bRemoveChild = true;
children.forEach(el => {
childNodes.forEach(el => {
if(bRemoveChild) {

@@ -72,0 +72,0 @@ if (el.textContent.trim() === "") {

{
"name": "@dreamworld/web-util",
"version": "1.3.1",
"version": "1.3.2-first-second-line-beetween-space-is-not-removed.1",
"description": "",

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

@@ -127,1 +127,31 @@ # web-util

```
###### Example-7 First node as text node
- **Input:**
```
hello1
<div>
<div></div>
<div> hello2 </div>
<div></div>
<div></div>
<div> hello3 </div>
<div></div>
<div></div>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
```
- **Output:**
```
hello1
<div>
<div></div>
<div>hello2 </div>
<div></div>
<div></div>
<div> hello3</div>
</div>
```
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