Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.3.0 to 0.4.0-rc.1

22

package.json
{
"name": "retext",
"version": "0.3.0",
"version": "0.4.0-rc.1",
"description": "Extensible system for analysing and manipulating natural language",

@@ -16,4 +16,4 @@ "license": "MIT",

"dependencies": {
"nlcst-to-textom": "^0.0.1",
"parse-latin": "^0.3.0",
"nlcst-to-textom": "^0.1.0",
"parse-latin": "^0.4.0-rc.1",
"textom": "^0.3.0",

@@ -30,4 +30,4 @@ "ware": "^1.2.0"

"istanbul": "^0.3.0",
"jscs": "^1.7.0",
"matcha": "^0.5.0",
"jscs": "^1.0.0",
"matcha": "^0.6.0",
"mocha": "^2.0.0"

@@ -38,11 +38,11 @@ },

"test-travis": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js",
"lint": "npm run-script lint-api && npm run-script lint-test && npm run-script lint-benchmark && npm run-script lint-style",
"lint-api": "node_modules/.bin/eslint index.js --env node --env browser",
"lint-test": "node_modules/.bin/eslint test.js --env node --env mocha",
"lint-benchmark": "node_modules/.bin/eslint benchmark.js --env node --global suite,set,bench",
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test.js",
"lint": "npm run lint-api && npm run lint-test && npm run lint-benchmark && npm run lint-style",
"lint-api": "node_modules/.bin/eslint index.js",
"lint-test": "node_modules/.bin/eslint test.js --env mocha",
"lint-benchmark": "node_modules/.bin/eslint benchmark.js --global suite,set,bench",
"lint-style": "node_modules/.bin/jscs index.js test.js benchmark.js --reporter=inline",
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test.js",
"benchmark": "node_modules/.bin/matcha benchmark.js",
"make": "npm run-script lint && npm run-script coverage"
"make": "npm run lint && npm run coverage"
}
}

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

# ![Retext logo](http://i58.tinypic.com/5xpx5z.png)
# ![Retext](https://github.com/wooorm/retext/raw/master/logo.svg)
[![Build Status](https://img.shields.io/travis/wooorm/retext.svg)](https://travis-ci.org/wooorm/retext) [![Coverage Status](https://img.shields.io/coveralls/wooorm/retext.svg)](https://coveralls.io/r/wooorm/retext?branch=master) [![Code Climate](http://img.shields.io/codeclimate/github/wooorm/retext.svg)](https://codeclimate.com/github/wooorm/retext)
[![Build Status](https://img.shields.io/travis/wooorm/retext.svg?style=flat)](https://travis-ci.org/wooorm/retext) [![Coverage Status](https://img.shields.io/coveralls/wooorm/retext.svg?style=flat)](https://coveralls.io/r/wooorm/retext?branch=master) [![Code Climate](http://img.shields.io/codeclimate/github/wooorm/retext.svg?style=flat)](https://codeclimate.com/github/wooorm/retext)
> Hey all! First, thanks a lot for watching, starring, and forking **retext**!
Secondly, I wanted to invite you all to leave any [feedback](mailto:tituswormer@gmail.com) or [issues](https://github.com/wooorm/retext/issues) you might have, to help me make **retext** even cooler :smile:.
---
**retext** is an extensible natural language system—by default using **[parse-latin](https://github.com/wooorm/parse-latin)** to transform natural language into a **[TextOM](https://github.com/wooorm/textom/)** object model. **Retext** provides a pluggable system for analysing and manipulating natural language in JavaScript. NodeJS and the browser. Tests provide 100% coverage.

@@ -97,11 +92,17 @@

### Retext#use(function(Retext, Object), options?)
### Retext#use([plugin](plugin), options?)
Takes a plugin—a humble function to transform the object model.
Can return a function (`function(Node, Object, next)`) which is given the document as created by `Retext#parse()` before its given to the user.
Optionally takes an `options` object, but its up to plugin authors to support settings.
### Retext#parse(value, options?, function(Error, Node))
### Retext#parse(value, options?, function(Error, NLCSTNode))
Parses the given source and, when done, passes either an error (the first argument), or the (by `use`d plugins, modified) document (the second argument) to the callback.
### plugin
A plugin is simply a function, with `function(retext, options?)` as its signature. The first argument is the **Retext** instance a user attached the plugin to. The plugin is invoked when a user `use`s the plugin (not when a document is parsed) and enables the plugin to modify the internal Object Model ([`retext.TextOM`](https://github.com/wooorm/textom)) or the parser ([`retext.parser`](https://github.com/wooorm/parse-latin)).
The plugin can return another function: `function(NLCSTNode, options, next?)`. This function is invokeded when a document is parsed. It’s given the document as created by `Retext#parse()` before its given to the user.
## Plugins

@@ -142,3 +143,3 @@

- retext-frequent-words — Like **retext-keywords**, but based on frequency and stop-words instead of a POS-tagger;
- retext-hyphen — Insert soft-hyphens where needed; this might have to be implemented with some sort of node which doesn't stringify;
- retext-hyphen — Insert soft-hyphens where needed; this might have to be implemented with some sort of node which doesn’t stringify;
- retext-location — Track the position of nodes (line, column);

@@ -145,0 +146,0 @@ - retext-no-pants — Opposite of **retext-smartypants**;

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