Socket
Socket
Sign inDemoInstall

cheerio

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheerio - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

20

History.md
0.10.3 / 2012-11-18
===================
* fixed outer html bug
* Updated documentation for $(...).html() and $.html()
0.10.2 / 2012-11-17
==================
===================
* Added a toString() method (@bensheldon)
* use `_.each` and `_.map` to simplify cheerio namesakes (@davidchambers)
* Added filter() with tests and updated readme (@bensheldon & @davidchambers)
* Added spaces between attributes rewritten by removeClass (@jos3000)
* updated docs to remove reference to size method (@ironchefpython)
* removed tidy from cheerio
* Added a toString() method (@bensheldon)
* use `_.each` and `_.map` to simplify cheerio namesakes (@davidchambers)
* Added filter() with tests and updated readme (@bensheldon & @davidchambers)
* Added spaces between attributes rewritten by removeClass (@jos3000)
* updated docs to remove reference to size method (@ironchefpython)
* removed tidy from cheerio

@@ -12,0 +18,0 @@ 0.10.1 / 2012-10-04

@@ -37,3 +37,3 @@ /**

if (dom) {
dom = (typeof dom === 'string') ? select(selector, this._root) : dom;
dom = (typeof dom === 'string') ? select(dom, this._root) : dom;
return render(dom);

@@ -40,0 +40,0 @@ } else if (this._root && this._root.children) {

@@ -6,3 +6,3 @@ {

"keywords": ["htmlparser", "jquery", "selector", "scraper"],
"version": "0.10.2",
"version": "0.10.3",
"repository": {

@@ -9,0 +9,0 @@ "type": "git",

@@ -424,8 +424,6 @@ # cheerio [![Build Status](https://secure.travis-ci.org/MatthewMueller/cheerio.png?branch=master)](http://travis-ci.org/MatthewMueller/cheerio)

$('.orange').html()
//=> <li class = "orange">Orange</li>
//=> Orange
$('#fruits').html('<li class = "mango">Mango</li>').html()
//=> <ul id="fruits">
// <li class="mango">Mango</li>
// </ul>
//=> <li class="mango">Mango</li>
```

@@ -458,6 +456,6 @@

If you want to render just a piece of the document you can use selectors:
If you want to return the outerHTML you can use `$.html(selector)`:
```js
$('.pear').html()
$.html('.pear')
//=> <li class = "pear">Pear</li>

@@ -464,0 +462,0 @@ ```

var expect = require('expect.js'),
fixtures = require('./fixtures'),
$ = require('../');

@@ -31,2 +32,6 @@

it('(selector) : should return the outerHTML of the selected element', function() {
var _$ = $.load(fixtures.fruits);
expect(_$.html('.pear')).to.equal('<li class="pear">Pear</li>');
});
});

@@ -33,0 +38,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