Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

retext-latin

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retext-latin - npm Package Compare versions

Comparing version 2.0.4 to 3.0.0

index.d.ts

19

index.js

@@ -1,11 +0,16 @@

'use strict'
/**
* @typedef {import('unified').Plugin<[]>} Plugin
*/
var unherit = require('unherit')
var Latin = require('parse-latin')
import {unherit} from 'unherit'
// @ts-expect-error: untyped.
import {ParseLatin as Parser} from 'parse-latin'
module.exports = parse
parse.Parser = Latin
// Untyped.
// type-coverage:ignore-next-line
export {Parser}
function parse() {
this.Parser = unherit(Latin)
/** @type {Plugin} */
export default function retextLatin() {
Object.assign(this, {Parser: unherit(Parser)})
}
{
"name": "retext-latin",
"version": "2.0.4",
"description": "retext parser for Latin-script natural languages",
"version": "3.0.0",
"description": "retext plugin to parse Latin-script prose",
"license": "MIT",
"keywords": [
"unified",
"retext",
"retext-plugin",
"plugin",
"natural",

@@ -17,3 +21,3 @@ "language",

"homepage": "https://github.com/retextjs/retext",
"repository": "https://github.com/retextjs/retext/tree/master/packages/retext-latin",
"repository": "https://github.com/retextjs/retext/tree/main/packages/retext-latin",
"bugs": "https://github.com/retextjs/retext/issues",

@@ -28,9 +32,25 @@ "funding": {

],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"parse-latin": "^4.0.0",
"unherit": "^1.0.4"
"parse-latin": "^5.0.0",
"unherit": "^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
}
}

@@ -17,37 +17,52 @@ # retext-latin

<!--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
This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):
Node 12+ is needed to use it and it must be `import`ed instead of `require`d.
[npm][]:

@@ -62,12 +77,12 @@

```js
var unified = require('unified')
var stream = require('unified-stream')
var latin = require('retext-latin')
var stringify = require('retext-stringify')
var emoji = require('retext-emoji')
import {unified} from 'unified'
import {stream} from 'unified-stream'
import retextLatin from 'retext-latin'
import retextStringify from 'retext-stringify'
import retextEmoji from 'retext-emoji'
var processor = unified()
.use(latin)
.use(emoji, {convert: 'encode'})
.use(stringify)
const processor = unified()
.use(retextLatin)
.use(retextEmoji, {convert: 'encode'})
.use(retextStringify)

@@ -79,8 +94,11 @@ process.stdin.pipe(stream(processor)).pipe(process.stdout)

### `processor.use(latin)`
This package exports the following identifiers: `Parser`.
`retextLatin` is the default export.
### `unified().use(retextLatin)`
Parse Latin-script natural language.
There is no configuration for the parser.
### `latin.Parser`
### `Parser`

@@ -99,4 +117,4 @@ Access to the [parser][] ([`parse-latin`][parse-latin]).

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.

@@ -110,5 +128,5 @@

[build-badge]: https://img.shields.io/travis/retextjs/retext/master.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

@@ -133,13 +151,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

@@ -150,3 +168,3 @@ [ideas]: https://github.com/retextjs/ideas

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

@@ -166,3 +184,1 @@ [author]: https://wooorm.com

[parse-latin]: https://github.com/wooorm/parse-latin
[announcement]: https://medium.com/unifiedjs/collectively-evolving-through-crowdsourcing-22c359ea95cc
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc