{"name":"nlcst-to-string","version":"3.1.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/nlcst":"^1.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.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.44.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},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"4d78f44de5a0ed51364236f639bdffd76d9bd8c0","homepage":"https://github.com/syntax-tree/nlcst-to-string#readme","_id":"nlcst-to-string@3.1.0","_nodeVersion":"16.6.1","_npmVersion":"7.20.6","dist":{"integrity":"sha512-Y8HQWKw/zrHTCnu2zcFBN1dV6vN0NUG7s5fkEj380G8tF3R+vA2KG+tDl2QoHVQCTHGHVXwoni2RQkDSFQb1PA==","shasum":"359519a16f086114538fcbb454e86967c471f823","tarball":"http://registry-npm.ywwl.com/nlcst-to-string/download/nlcst-to-string-3.1.0.tgz","fileCount":5,"unpackedSize":7484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKKPCCRA9TVsSAnZWagAAYLEP/3oWyUk9uTR3N+4sY0Yo\njgKpMCuaTHt4OcxZRg1+PFyEZoD2ZtV/bmRDfbd0uMPtO+SA/LqyiCapiSBs\nrFVa38Y+d8XIDIZkhuOz4TCfWlxXYKhELO1Xj9jgi8X7cT7Y6rhhKro0+90E\nondi2eaIDQ9L5sTghKoucNZv/GYfyJ9jupIdTss2UM8xsHYr1EuhTYz2Tm9o\nChdHVvdv+6CiKYbbAkv9ydUUcpQ6q+cAvF+rCSKl3aZ6lXXn/9kY/iPFg/+g\nLEzAVVEjbmX+9CwqDeqKli4KTP4eMbQ8HBIAakeCZPL1jlzPUMGvarDXEbf7\nWoWdy9y0kETAZIKpS94sbH6Pzjjf+Df4raBBr34OXSJMtYx14btSlTD6ySZp\nsVZUukaX0nh7JufzCwE2KeY2qv4HIEGt5gQAH0yfQdDzZ1BixMymH4vPj8q7\n98GO+V0mfOHJPR7w4EbClwyQCR9x4AWNTO5t7Vu7UVHFVemUCgf3SoojFE+R\nHp/fy3sY3yB1N0o9gvsir59vw4+gYKnsW0RlYBqx+381mNLFA7e4Zy66gUlQ\nlo8k3pGzzmsyOAsXz8g8E5KKIest9yaJAbrvAH7osf8uaDVWtY0Xu6JLPY4a\nwIHVJFhJpFWR3dwZP0pc2hhjXcrpRTlXLMQj9FWjhpBByrHQQRVTQxJfmq7w\nfRUG\r\n=MQeA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZV6Tke9rd6lQH7xgD8RHiOrynpNxeZu3/huPZOBCkvAiEAgnL6i31rrnV91pU3cWr1ZC24bWbdcAhq6YIWyOVfpuw="}],"size":3224,"noattachment":false,"key":"/nlcst-to-string/-/nlcst-to-string-3.1.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.1.0_1630053314597_0.24499031646267055"},"_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":1630053314754,"_cnpm_publish_time":1630053314754,"dist-tags":{"latest":"4.0.0"}}