cheerio icon indicating copy to clipboard operation
cheerio copied to clipboard

Stringify behaviour differs between cheerio and jQuery

Open stevenvachon opened this issue 7 years ago • 2 comments

jQuery fragment html():

$("<html></html>").html()
//-> ""

cheerio fragment html():

const $ = cheerio.load("")

$("<html></html>").html()
//-> <html><head></head><body></body></html>

jQuery toString():

$(":root").toString()
//-> [object Object]

cheerio toString():

const $ = cheerio.load("")

$(":root").toString()
//-> <html><head></head><body></body></html>

@inikulin @fb55

stevenvachon avatar Jun 23 '17 15:06 stevenvachon

@fb55 @inikulin this could use the label jQuery Differences https://github.com/cheeriojs/cheerio/issues?q=is%3Aopen+is%3Aissue+label%3A%22jQuery+Differences%22

jcrben avatar Mar 29 '18 05:03 jcrben

Thanks @jcrben!

fb55 avatar Mar 31 '18 15:03 fb55