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

htmldom

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmldom - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

test/lib/elements/replaceWith.js

7

lib/$elements.js

@@ -144,2 +144,9 @@ let QuerySelector = require('./query.selector')

}
/**
* @example
* $('div').replaceWith('<view>1</view>')
*/
replaceWith (content) {
return this.before(content).remove()
}

@@ -146,0 +153,0 @@ /**

2

package.json
{
"name": "htmldom",
"version": "4.0.2",
"version": "4.0.3",
"description": "Simplified html handle in nodejs",

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

@@ -124,2 +124,3 @@ # htmldom — Simplified html or xml handle in nodejs

```
* replaceWith(content)
* append(content)

@@ -130,2 +131,3 @@ * prepend(content)

```js
$('div').replaceWith('<view></view>')
$('').append('<h3>title');

@@ -132,0 +134,0 @@ $('').before('<h3>title');

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