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.0 to 4.0.1

htmldom.umd.js

11

htmldom.js

@@ -13,2 +13,4 @@ let $Elements = require('./lib/$elements.js')

* $('div a').addClass('title').html()
* $.nodes
* $.root().prepend('<head></head>')
* $.html()

@@ -33,2 +35,9 @@ * $.beautify()

htmldom.root = function () {
return new $Elements({
type: 'root',
children: nodes
})
}
htmldom.html = function () {

@@ -72,2 +81,4 @@ return getHtml({

return htmldom

@@ -74,0 +85,0 @@ }

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

}
return this
}

@@ -140,2 +142,4 @@ /**

}
return this
}

@@ -155,2 +159,4 @@

}
return this
}

@@ -157,0 +163,0 @@

7

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

@@ -8,3 +8,3 @@ "main": "htmldom.js",

"test": "mocha --recursive",
"browserify": "browserify -r ./htmldom.js:htmldom > htmldom.browser.js"
"umd": "browserify htmldom.js -s createHtmlDom > htmldom.umd.js"
},

@@ -32,3 +32,4 @@ "repository": {

},
"homepage": "https://github.com/douzi8/htmldom"
"homepage": "https://github.com/douzi8/htmldom",
"devDependencies": {}
}

@@ -29,6 +29,6 @@ # htmldom — Simplified html or xml handle in nodejs

## browserify
## umd
Open [test.html](https://github.com/douzi8/htmldom/blob/master/test.html) with browser
```
npm run browserify
npm run umd
```

@@ -170,3 +170,3 @@

### $.nodes
Get a dom
Get a dom tree
```

@@ -176,2 +176,15 @@ $.nodes

### $.root()
```js
let $ = createHtmlDom('<div></div>')
$.root().prepend('<head></head>')
// true
$.root().find('div')[0] === $('div')[0]
// '<head></head><div></div>'
$.html()
```
### $.html()

@@ -178,0 +191,0 @@ If you want get html string fast, choose this api, it's only output origin html code

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