{"name":"nlcst-to-string","version":"2.0.4","description":"nlcst utility to transform a tree to a string","license":"MIT","keywords":["unist","nlcst","nlcst-util","util","utility","string","serialize","stringify"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/nlcst-to-string.git"},"bugs":{"url":"https://github.com/syntax-tree/nlcst-to-string/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Kenichiro Murata","email":"kenichiro.murata@gmail.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^15.0.0","prettier":"^1.0.0","remark-cli":"^7.0.0","remark-preset-wooorm":"^6.0.0","tape":"^4.0.0","tinyify":"^2.0.0","unist-builder":"^2.0.0","xo":"^0.26.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s nlcstToString -o nlcst-to-string.js","build-mangle":"browserify . -s nlcstToString -p tinyify -o nlcst-to-string.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"ignore":["nlcst-to-string.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"416375da1a9205d30c98fe5f4f0c32b29f4b87d0","homepage":"https://github.com/syntax-tree/nlcst-to-string#readme","_id":"nlcst-to-string@2.0.4","_nodeVersion":"13.0.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-3x3jwTd6UPG7vi5k4GEzvxJ5rDA7hVUIRNHPblKuMVP9Z3xmlsd9cgLcpAMkc5uPOBna82EeshROFhsPkbnTZg==","shasum":"9315dfab80882bbfd86ddf1b706f53622dc400cc","tarball":"http://registry-npm.ywwl.com/nlcst-to-string/download/nlcst-to-string-2.0.4.tgz","fileCount":4,"unpackedSize":6390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeS66HCRA9TVsSAnZWagAAOTAQAKF/Mc/uPJfxG/bhCFXy\nwXfhIwhLKceJP1ZgnF8l4xcWJgcWbJiyabtb1yjg9aqATLmM3dSQvCBU+UuK\nqF1v6rk8t8O87aWBPa3XxovywFVo2mDr1lH7NJaVwKHGKsBq1JbEbec8nani\nsOuFcvTXL1sIafjtevUGiAXKm1wO+AudAlWZC9vfzr6M3KZGheNQbYMvssoD\nkxbhc16XcoST+JkRGO9FwzNv680hwEuqCdgL1CriRGA/8EkYgwwIOCqOyQDg\nZRBm/nZ0F+OAO13O2i7W7PDOS/lnG46qxzzXiA+o9NsG2tzrsyWQa3hlPXt3\nW3iCiKie9CyWkZXefdIBzfsYDG5NZeu+5X0HHaKW+4UrYLlLArCaGHS2G8SD\notKWppTz/yvLnU45ua8jwMB7Ugkd5cEac1NqjJngiwTCYh5vauj+ZYGBOQDY\n268piN2X5/Wl6IYYN1934wXMNRXvlYQVPs2azBT+E1qEMBUtnNGV8qrhMOcb\n8EqViJ7Bl+fwuUpzhHlbHut0rSdNB509WMH7DlV7APmlcbWYGZr4r/CyTG4H\njZOjbLKmOp3+zgLBl0z/A2EJFGIFsZ+EZAmZ0A0boLZzHWeE6v4nHwJMosYQ\nd1UFNSxQIfieVhE6llnuIhjnfIMJz6fd0UWk4/K36j+FDlqsE93ncG6PmdL1\nfUUY\r\n=Eh7U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHtgeCp8f/hampqYiDa8sUARVK1G6suBdHmICoyDCJ2ZAiAMRPMgIp/Z+B2crOBb9BVkE3bMbFSF5dtAXmYRWMRekA=="}],"size":2846,"noattachment":false,"key":"/nlcst-to-string/-/nlcst-to-string-2.0.4.tgz"},"maintainers":[{"email":"keith@mcknig.ht","name":"kmck"},{"email":"tituswormer@gmail.com","name":"wooorm"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nlcst-to-string_2.0.4_1582018182774_0.22154123624141064"},"_hasShrinkwrap":false,"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":1582018182934,"_cnpm_publish_time":1582018182934,"dist-tags":{"latest":"4.0.0"}}