🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

retext-stringify

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-stringify - npm Package Compare versions

Comparing version

to
2.0.0

45

index.js

@@ -1,46 +0,13 @@

/**
* @author Titus Wormer
* @copyright 2014 Titus Wormer
* @license MIT
* @module retext:stringify
* @fileoverview NLCST to text compiler.
*/
'use strict';
/* eslint-env commonjs */
/* Dependencies. */
var toString = require('nlcst-to-string');
/**
* Attacher.
*
* @param {unified} processor - Unified processor.
* @param {Object?} [config={}] - Configuration.
*/
function stringify(processor) {
/**
* Construct a new compiler.
*/
function Compiler() {}
module.exports = stringify;
/**
* Compile the bound file.
*
* @param {Node} tree - NLCST node.
* @return {string} - text.
*/
function compile(tree) {
return toString(tree);
}
function stringify() {
this.Compiler = compiler;
}
/* Expose methods. */
Compiler.prototype.compile = compile;
/* Expose parser. */
processor.Compiler = Compiler;
function compiler(tree) {
return toString(tree);
}
/* Expose plugin. */
module.exports = stringify;

2

package.json
{
"name": "retext-stringify",
"version": "1.0.0",
"version": "2.0.0",
"description": "NLCST to text compiler for retext",

@@ -5,0 +5,0 @@ "license": "MIT",

# retext-stringify [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
[Compiler][] for [**unified**][unified]. Stringifies an
[**nlcst**][nlcst] syntax tree to text. Used in the [**retext**
[**NLCST**][nlcst] syntax tree to text. Used in the [**retext**
processor][processor].

@@ -24,7 +24,7 @@

process.stdin
.pipe(unified())
.use(english)
.use(emoji, {convert: 'encode'})
.use(stringify)
.pipe(process.stdout);
.pipe(unified())
.use(english)
.use(emoji, {convert: 'encode'})
.use(stringify)
.pipe(process.stdout);
```

@@ -31,0 +31,0 @@