Licence
ISC
Version
2.0.0
Deps
0
Size
19 kB
Vulns
0
Weekly
0
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'));