{"name":"nlcst-to-string","version":"0.1.2","description":"Transform a Natural Language Concrete Syntax Tree (NLCST) node into a string","license":"MIT","keywords":["nlcst","to","string"],"repository":{"type":"git","url":"https://github.com/wooorm/nlcst-to-string.git"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com"},"devDependencies":{"eslint":"^0.9.0","istanbul":"^0.3.0","jscs":"^1.0.0","mocha":"^2.0.0"},"scripts":{"test":"_mocha --reporter spec --check-leaks -u exports test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js","coverage":"istanbul cover node_modules/.bin/_mocha -- -- test.js","lint":"npm run-script lint-api && npm run-script lint-test && npm run-script lint-style","lint-api":"eslint index.js","lint-test":"eslint test.js --env mocha","lint-style":"jscs index.js test.js --reporter=inline","make":"npm run-script lint && npm run-script coverage"},"gitHead":"50790d8fc9804b33650d4079ad73c2e86aac3230","bugs":{"url":"https://github.com/wooorm/nlcst-to-string/issues"},"homepage":"https://github.com/wooorm/nlcst-to-string","_id":"nlcst-to-string@0.1.2","_shasum":"f66d2947d1de532492c2d3129169c0dd8a3fadab","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"dist":{"shasum":"f66d2947d1de532492c2d3129169c0dd8a3fadab","tarball":"http://registry-npm.ywwl.com/nlcst-to-string/download/nlcst-to-string-0.1.2.tgz","integrity":"sha512-Y+Ubl6SDBuzD7DsScB51ijseOZaZsaQuZZM5TTXp2yIFz3/bi9HAoPqkQy6humPRqc/ZrsM/eI6wBV4qaogBBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/PhpB1Ou73w+KKpRDUTyyJw8xAxwi8LZ6fBHfowrtDAiEAvldv0hitRG9obTJSlTMtCNvVUznEV4xZBQp4nvCv2xY="}],"size":2024,"noattachment":false,"key":"/nlcst-to-string/-/nlcst-to-string-0.1.2.tgz"},"directories":{},"readme":"# nlcst-to-string\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[nlcst][] utility to serialize a node.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`toString(value)`](#tostringvalue)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a utility that takes [nlcst][] nodes and gets their plain-text\nvalue.\n\n## When should I use this?\n\nThis is a small utility that is useful when you’re dealing with ASTs.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install nlcst-to-string\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {toString} from 'https://esm.sh/nlcst-to-string@4'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {toString} from 'https://esm.sh/nlcst-to-string@4?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {toString} from 'nlcst-to-string'\n\nconsole.log(\n  toString({\n    type: 'WordNode',\n    children: [\n      {type: 'TextNode', value: 'AT'},\n      {type: 'SymbolNode', value: '&'},\n      {type: 'TextNode', value: 'T'}\n    ]\n  })\n) // => 'AT&T'\n```\n\n## API\n\nThis package exports the identifier [`toString`][api-to-string].\nThere is no default export.\n\n### `toString(value)`\n\nGet the text content of a node or list of nodes.\n\nPrefers the node’s plain-text fields, otherwise serializes its children, and\nif the given value is an array, serialize the nodes in it.\n\n###### Parameters\n\n*   `node` ([`Array<Node>`][node] or `Node`)\n    — node or list of nodes to serialize\n\n###### Returns\n\nResult (`string`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `nlcst-to-string@^4`,\ncompatible with Node.js 16.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for\nways to get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/syntax-tree/nlcst-to-string/workflows/main/badge.svg\n\n[build]: https://github.com/syntax-tree/nlcst-to-string/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/nlcst-to-string.svg\n\n[coverage]: https://codecov.io/github/syntax-tree/nlcst-to-string\n\n[downloads-badge]: https://img.shields.io/npm/dm/nlcst-to-string.svg\n\n[downloads]: https://www.npmjs.com/package/nlcst-to-string\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=nlcst-to-string\n\n[size]: https://bundlejs.com/?q=nlcst-to-string\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/syntax-tree/unist/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[health]: https://github.com/syntax-tree/.github\n\n[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md\n\n[support]: https://github.com/syntax-tree/.github/blob/main/support.md\n\n[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md\n\n[nlcst]: https://github.com/syntax-tree/nlcst\n\n[node]: https://github.com/syntax-tree/nlcst#nodes\n\n[api-to-string]: #tostringvalue\n","publish_time":1415272844019,"_cnpm_publish_time":1415272844019,"dist-tags":{"latest":"4.0.0"}}