Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

cheerio-create-text-node

1.0.0 • Public • Published

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'));

Keywords

none

Install

npm i cheerio-create-text-node

DownloadsWeekly Downloads

6

Version

1.0.0

License

ISC

Last publish

Collaborators

  • avatar