cheerio-create-text-node
v2.0.0
Published
Add .createTextNode(text) functionality to [cheerio](https://www.npmjs.com/package/cheerio)
Downloads
7
Maintainers
Readme
cheerio-create-text-node
Add .createTextNode(text) functionality to cheerio
demo
import * as cheerio from 'cheerio';
import * as cheerioCreateTextNode from 'cheerio-create-text-node';
$ = cheerio.load('<ul> <li></li> </ul>');
cheerioCreateTextNode.use($);
append
let text = $.createTextNode(123);
$('ul').append(text);
appendTo
let text = $.createTextNode(123);
text.appendTo($('ul'));