You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

retext

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retext - npm Package Compare versions

Comparing version

to
8.0.0

index.d.ts

13

index.js

@@ -1,10 +0,5 @@

'use strict'
import {unified} from 'unified'
import retextLatin from 'retext-latin'
import retextStringify from 'retext-stringify'
var unified = require('unified')
var latin = require('retext-latin')
var stringify = require('retext-stringify')
module.exports = unified()
.use(latin)
.use(stringify)
.freeze()
export const retext = unified().use(retextLatin).use(retextStringify).freeze()
{
"name": "retext",
"version": "7.0.1",
"description": "Natural language processor powered by plugins",
"version": "8.0.0",
"description": "natural language processor powered by plugins part of the unified collective",
"license": "MIT",
"keywords": [
"unified",
"retext",
"natural",

@@ -17,9 +19,4 @@ "language",

],
"dependencies": {
"retext-latin": "^2.0.0",
"retext-stringify": "^2.0.0",
"unified": "^8.0.0"
},
"homepage": "https://github.com/retextjs/retext",
"repository": "https://github.com/retextjs/retext/tree/master/packages/retext",
"repository": "https://github.com/retextjs/retext/tree/main/packages/retext",
"bugs": "https://github.com/retextjs/retext/issues",

@@ -34,6 +31,25 @@ "funding": {

],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.d.ts",
"index.js"
],
"scripts": {}
"dependencies": {
"retext-latin": "^3.0.0",
"retext-stringify": "^3.0.0",
"unified": "^10.0.0"
},
"scripts": {
"build": "rimraf \"*.d.ts\" && tsc && type-coverage"
},
"xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}

@@ -18,41 +18,55 @@ # retext

* [Plugins][] transform the tree
* Compiles the tree to markdown using [`retext-stringify`][stringify]
* Serialize the tree to natural language using [`retext-stringify`][stringify]
Don’t need the parser? Or the compiler? [That’s OK][unified-usage].
Don’t need the parser?
Or the compiler?
[That’s OK][unified-usage].
## Sponsors
<!--lint ignore no-html maximum-line-length-->
Support this effort and give back by sponsoring on [OpenCollective][collective]!
<!--lint ignore no-html-->
<table>
<tr valign="top">
<td width="20%" align="center">
<a href="https://zeit.co"><img src="https://avatars1.githubusercontent.com/u/14985020?s=400&v=4"></a>
<br><br>🥇
<a href="https://zeit.co">ZEIT</a>
</td>
<td width="20%" align="center">
<a href="https://www.gatsbyjs.org"><img src="https://avatars1.githubusercontent.com/u/12551863?s=400&v=4"></a>
<br><br>🥇
<a href="https://www.gatsbyjs.org">Gatsby</a>
</td>
<td width="20%" align="center">
<a href="https://www.netlify.com"><img src="https://avatars1.githubusercontent.com/u/7892489?s=400&v=4"></a>
<br><br>🥇
<a href="https://www.netlify.com">Netlify</a>
</td>
<td width="20%" align="center">
<a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=400&v=4"></a>
<br><br>
<a href="https://www.holloway.com">Holloway</a>
</td>
<td width="20%" align="center">
<br><br><br><br>
<a href="https://opencollective.com/unified"><strong>You?</strong>
</td>
</tr>
<tr valign="middle">
<td width="20%" align="center" colspan="2">
<a href="https://www.gatsbyjs.org">Gatsby</a> 🥇<br><br>
<a href="https://www.gatsbyjs.org"><img src="https://avatars1.githubusercontent.com/u/12551863?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" colspan="2">
<a href="https://vercel.com">Vercel</a> 🥇<br><br>
<a href="https://vercel.com"><img src="https://avatars1.githubusercontent.com/u/14985020?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" colspan="2">
<a href="https://www.netlify.com">Netlify</a><br><br>
<!--OC has a sharper image-->
<a href="https://www.netlify.com"><img src="https://images.opencollective.com/netlify/4087de2/logo/256.png" width="128"></a>
</td>
<td width="10%" align="center">
<a href="https://www.holloway.com">Holloway</a><br><br>
<a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=128&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://themeisle.com">ThemeIsle</a><br><br>
<a href="https://themeisle.com"><img src="https://avatars1.githubusercontent.com/u/58979018?s=128&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://boosthub.io">Boost Hub</a><br><br>
<a href="https://boosthub.io"><img src="https://images.opencollective.com/boosthub/6318083/logo/128.png" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://expo.io">Expo</a><br><br>
<a href="https://expo.io"><img src="https://avatars1.githubusercontent.com/u/12504344?s=128&v=4" width="64"></a>
</td>
</tr>
<tr valign="middle">
<td width="100%" align="center" colspan="10">
<br>
<a href="https://opencollective.com/unified"><strong>You?</strong></a>
<br><br>
</td>
</tr>
</table>
[**Read more about the unified collective on Medium »**][announcement]
## Install

@@ -69,13 +83,14 @@

```js
var retext = require('retext')
var profanities = require('retext-profanities')
var emoji = require('retext-emoji')
var report = require('vfile-reporter')
import {retext} from 'retext'
import retextProfanities from 'retext-profanities'
import retextEmoji from 'retext-emoji'
import {reporter} from 'vfile-reporter'
retext()
.use(profanities)
.use(emoji, {convert: 'encode'})
.process('He’s set on beating your butt for sheriff! :cop:', function(err, file) {
.use(retextProfanities)
.use(retextEmoji, {convert: 'encode'})
.process('He’s set on beating your butt for sheriff! :cop:')
.then((file) => {
console.log(String(file))
console.error(report(err || file))
console.error(reporter(file))
})

@@ -103,4 +118,4 @@ ```

This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.

@@ -114,5 +129,5 @@

[build-badge]: https://img.shields.io/travis/retextjs/retext.svg
[build-badge]: https://github.com/retextjs/retext/workflows/main/badge.svg
[build]: https://travis-ci.org/retextjs/retext
[build]: https://github.com/retextjs/retext/actions

@@ -137,13 +152,13 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext.svg

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://spectrum.chat/unified/retext
[chat]: https://github.com/retextjs/retext/discussions
[health]: https://github.com/retextjs/.github
[contributing]: https://github.com/retextjs/.github/blob/master/contributing.md
[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md
[support]: https://github.com/retextjs/.github/blob/master/support.md
[support]: https://github.com/retextjs/.github/blob/main/support.md
[coc]: https://github.com/retextjs/.github/blob/master/code-of-conduct.md
[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md

@@ -154,3 +169,3 @@ [ideas]: https://github.com/retextjs/ideas

[license]: https://github.com/retextjs/Lobby/blob/master/license
[license]: https://github.com/retextjs/retext/blob/main/license

@@ -163,9 +178,9 @@ [author]: https://wooorm.com

[announcement]: https://medium.com/unifiedjs/collectively-evolving-through-crowdsourcing-22c359ea95cc
[unified-usage]: https://github.com/unifiedjs/unified#usage
[latin]: https://github.com/retextjs/retext/tree/master/packages/retext-latin
[latin]: https://github.com/retextjs/retext/tree/main/packages/retext-latin
[stringify]: https://github.com/retextjs/retext/tree/master/packages/retext-stringify
[stringify]: https://github.com/retextjs/retext/tree/main/packages/retext-stringify
[plugins]: https://github.com/retextjs/retext/tree/master/doc/plugins.md
[plugins]: https://github.com/retextjs/retext/tree/main/doc/plugins.md

@@ -175,3 +190,1 @@ [retext]: https://github.com/retextjs/retext

[nlcst]: https://github.com/syntax-tree/nlcst
[unified-usage]: https://github.com/unifiedjs/unified#usage