retext-stringify
Advanced tools
Comparing version
10
index.js
@@ -1,13 +0,13 @@ | ||
'use strict'; | ||
'use strict' | ||
var toString = require('nlcst-to-string'); | ||
var toString = require('nlcst-to-string') | ||
module.exports = stringify; | ||
module.exports = stringify | ||
function stringify() { | ||
this.Compiler = compiler; | ||
this.Compiler = compiler | ||
} | ||
function compiler(tree) { | ||
return toString(tree); | ||
return toString(tree) | ||
} |
{ | ||
"name": "retext-stringify", | ||
"version": "2.0.0", | ||
"description": "NLCST to text compiler for retext", | ||
"version": "2.0.1", | ||
"description": "nlcst to text compiler for retext", | ||
"license": "MIT", | ||
@@ -16,12 +16,9 @@ "keywords": [ | ||
], | ||
"homepage": "https://github.com/wooorm/retext", | ||
"repository": "https://github.com/wooorm/retext/tree/master/packages/retext-stringify", | ||
"bugs": "https://github.com/wooorm/retext/issues", | ||
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
"homepage": "https://github.com/retextjs/retext", | ||
"repository": "https://github.com/retextjs/retext/tree/master/packages/retext-stringify", | ||
"bugs": "https://github.com/retextjs/retext/issues", | ||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)", | ||
"contributors": [ | ||
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)" | ||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)" | ||
], | ||
"engines": { | ||
"node": ">=0.11.0" | ||
}, | ||
"files": [ | ||
@@ -28,0 +25,0 @@ "index.js" |
@@ -1,6 +0,6 @@ | ||
# retext-stringify [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat] | ||
# retext-stringify [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Size][size-badge]][size] [![Chat][chat-badge]][chat] | ||
[Compiler][] for [**unified**][unified]. Stringifies an | ||
[**NLCST**][nlcst] syntax tree to text. Used in the [**retext** | ||
processor][processor]. | ||
[Compiler][] for [**unified**][unified]. | ||
Stringifies a syntax tree ([**nlcst**][nlcst]) to text. | ||
Used in the [**retext** processor][processor]. | ||
@@ -18,13 +18,14 @@ ## Installation | ||
```js | ||
var unified = require('unified'); | ||
var english = require('retext-english'); | ||
var stringify = require('retext-stringify'); | ||
var emoji = require('retext-emoji'); | ||
var unified = require('unified') | ||
var stream = require('unified-stream') | ||
var english = require('retext-english') | ||
var stringify = require('retext-stringify') | ||
var emoji = require('retext-emoji') | ||
process.stdin | ||
.pipe(unified()) | ||
var processor = unified() | ||
.use(english) | ||
.use(emoji, {convert: 'encode'}) | ||
.use(stringify) | ||
.pipe(process.stdout); | ||
process.stdin.pipe(stream(processor)).pipe(process.stdout) | ||
``` | ||
@@ -53,26 +54,34 @@ | ||
[build-badge]: https://img.shields.io/travis/wooorm/retext.svg | ||
[build-badge]: https://img.shields.io/travis/retextjs/retext/master.svg | ||
[build-status]: https://travis-ci.org/wooorm/retext | ||
[build]: https://travis-ci.org/retextjs/retext | ||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/retext.svg | ||
[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext.svg | ||
[coverage-status]: https://codecov.io/github/wooorm/retext | ||
[coverage]: https://codecov.io/github/retextjs/retext | ||
[chat-badge]: https://img.shields.io/gitter/room/wooorm/retext.svg | ||
[downloads-badge]: https://img.shields.io/npm/dm/retext-stringify.svg | ||
[chat]: https://gitter.im/wooorm/retext | ||
[downloads]: https://www.npmjs.com/package/retext-stringify | ||
[license]: https://github.com/wooorm/retext/blob/master/LICENSE | ||
[size-badge]: https://img.shields.io/bundlephobia/minzip/retext-stringify.svg | ||
[author]: http://wooorm.com | ||
[size]: https://bundlephobia.com/result?p=retext-stringify | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat]: https://spectrum.chat/unified/retext | ||
[license]: https://github.com/retextjs/retext/blob/master/license | ||
[author]: https://wooorm.com | ||
[npm]: https://docs.npmjs.com/cli/install | ||
[unified]: https://github.com/wooorm/unified | ||
[unified]: https://github.com/unifiedjs/unified | ||
[processor]: https://github.com/wooorm/retext | ||
[processor]: https://github.com/retextjs/retext | ||
[compiler]: https://github.com/wooorm/unified#processorcompiler | ||
[compiler]: https://github.com/unifiedjs/unified#processorcompiler | ||
[nlcst]: https://github.com/wooorm/nlcst | ||
[nlcst]: https://github.com/syntax-tree/nlcst |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
3054
14.3%86
11.69%