{"name":"nlcst-to-string","version":"3.0.0","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"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/unist":"^2.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-builder":"^3.0.0","xo":"^0.38.0"},"scripts":{"prepack":"npm run build && npm run format","build":"rimraf \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"44e794d2fb9b4edddb279cbfee0d4a5192c1b2a9","homepage":"https://github.com/syntax-tree/nlcst-to-string#readme","_id":"nlcst-to-string@3.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.9.0","dist":{"integrity":"sha512-zhjRsqZUAyRQxz7E2DnxtJD7DTNfR2HhCbJsX39l5sM4ZaGO+CsbZCU4cF10Sj3GLl2zS4e13/rQrL+DSfx37g==","shasum":"3a75a3385fcb155584b1638cd0de9663abf63ac0","tarball":"http://registry-npm.ywwl.com/nlcst-to-string/download/nlcst-to-string-3.0.0.tgz","fileCount":5,"unpackedSize":7423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfvg+CRA9TVsSAnZWagAARmQQAIV+txrbvwkVFJgj7ifK\n5e90/1IBl1rYHXC1EUPeYybrRU20iHIlg8x1Jv4IPNbwdqPPUxomQUBFEu/h\nyHqhcPHodS0M785qjWq6VR5W2ldfeszraKK+0vJrKyoCB6UcjIV3vO+iCAV7\nr2qwUbmIbDPvANP41RUr6bUEtG6kmIxZ5oNKQT+/j5bxSAGv1/CVBAh0ATiP\nOpdFnI3lLebk3uE0s0hAD704RC1GEWr+ZxHgTd4EjzfqbME5pWDWzyYoavTZ\npidz3CqbMpwCW/SVJLDDOLOZSylktaUy01d8wYvRnLFpcBKk9agFvFfGxqPT\nn1zIUGyrTJjKikGkw3Utj+If1pJNTXaM6IyPWeYloEsk36c+wnpcJ0SHywXJ\nQSfeqO20DFkx3d7W8byPTDAh+I/BVFwVF10nbeiIMJ4KsSUkYvBBV0Qgqfac\nA3eadObowUjWf2UCCaeUOIvkdHA7snzqlm6w7EEGbVnI5KtVOndAyGQP8xFU\nDR7ma+0/W19qjmj4eY29tdl2k9ulTjIG62PAoCWX7V2owYqcKHB2nGGQ6RAJ\ndELqLpvxtO6nR1m3yZXcrOuG2XZMG8FMjqtSsGOzAcKtGwGmrsycOMlzoJ2i\ntmRYo01/eqOJDsGmdXqCPXzAI1skMQTF819UlCYLJBKvD6psEPuza2M8iAhX\n89Bf\r\n=nt4t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSH+qF2tz53ZGArBT3qNXTDxCoSjMB+Nqz+uDVgwU0owIgCfUf+YpKf1DfdSMUu/klU+SSYXHyVHxbEgm/7tWLk0U="}],"size":3228,"noattachment":false,"key":"/nlcst-to-string/-/nlcst-to-string-3.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"},{"name":"kmck","email":"keith@mcknig.ht"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nlcst-to-string_3.0.0_1618933821901_0.6270993963251075"},"_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":1618933822021,"_cnpm_publish_time":1618933822021,"dist-tags":{"latest":"4.0.0"}}