Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bluelovers/cheerio-create-text-node

Add .createTextNode(text) functionality to cheerio
https://github.com/bluelovers/cheerio-create-text-node

cheerio cheeriojs dom html text-nodes

Last synced: about 1 month ago
JSON representation

Add .createTextNode(text) functionality to cheerio

Awesome Lists containing this project

README

        

# cheerio-create-text-node

Add .createTextNode(text) functionality to [cheerio](https://www.npmjs.com/package/cheerio)

## demo

```
import * as cheerio from 'cheerio';
import * as cheerioCreateTextNode from 'cheerio-create-text-node';

$ = cheerio.load('

');
cheerioCreateTextNode.use($);
```

### append

```
let text = $.createTextNode(123);
$('ul').append(text);
```

### appendTo

```
let text = $.createTextNode(123);
text.appendTo($('ul'));
```