JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 836596
  • Score
    100M100P100Q192531F
  • License MIT

Stringify NLCST

Package Exports

  • nlcst-to-string

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nlcst-to-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nlcst-to-string Build Status Coverage Status

Stringify NLCST.

Installation

npm:

npm install nlcst-to-string

Usage

Dependencies:

var toString = require('nlcst-to-string');

Stringify:

var node = {
    type: 'WordNode',
    children: [
        { type: 'TextNode', value: 'AT' },
        { type: 'PunctuationNode', value: '&' },
        { type: 'TextNode', value: 'T' }
    ]
};
var value = toString(node);

Yields:

AT&T

API

toString(node[, separator])

Stringify the given NLCST node (or list of nodes).

Parameters
  • node (NLCSTNode or Array.<NLCSTNode>).
  • separator (string, optional, default: '') — Value to separate each item with.
Returns

string.

License

MIT © Titus Wormer