Transform an NLCST node into a string.
npm:
$ npm install nlcst-to-string
Component.js:
$ component install wooorm/nlcst-to-string
Bower:
$ bower install nlcst-to-string
var nlcstToString = require('nlcst-to-string');
console.log(nlcstToString({
"type": "WordNode",
"data": {
"partOfSpeech": [
"NNP",
"NN"
]
},
"children": [
{
"type": "TextNode",
"value": "AT"
},
{
"type": "PunctuationNode",
"value": "&"
},
{
"type": "TextNode",
"value": "T"
}
]
}));
/*
* "AT&T"
*/
MIT © Titus Wormer