{"_id":"unist-util-lsp","_rev":"6-2f13407f7b4181cb2b6e66b062340070","name":"unist-util-lsp","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"unist-util-lsp","version":"1.0.0","description":"Utility to convert between unist and language server protocol","license":"MIT","keywords":["unist","util","utility","lsp","language-server-protocol"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-lsp.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-lsp/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"contributors":[{"name":"Remco Haszing","email":"remcohaszing@gmail.com"}],"sideEffects":false,"type":"module","exports":"./index.js","dependencies":{"@types/unist":"^2.0.0","vscode-languageserver-types":"^3.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.52.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier -w . --loglevel warn  && xo --fix","test-api":"node test/index.js","test-coverage":"c8 --100 --reporter lcov node test/index.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},"types":"./index.d.ts","gitHead":"a6cbb552306d46e5d6ba568230449fa6daa05a8e","homepage":"https://github.com/syntax-tree/unist-util-lsp#readme","_id":"unist-util-lsp@1.0.0","_nodeVersion":"18.2.0","_npmVersion":"8.13.2","dist":{"integrity":"sha512-paDhqMwNdLFubTo4M8SDPcMaVxQEwCUvaTQsn1gb1iFxGxu9KQUeWihnUo6YyBfNJWmX/nlUNtBLx9ryEyrVCw==","shasum":"fefb8e565e088d282660f66704a19843d2f85775","tarball":"https://registry.npmjs.org/unist-util-lsp/-/unist-util-lsp-1.0.0.tgz","fileCount":7,"unpackedSize":11526,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHnbPuQO9XU9bmcV0OcR+oLxgHpm2ewciXI4pOUFCAQAIgWFEA6zhfFnY49brvtceYsaGpHmxEwuYdedt1LkRdvH8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjC49PACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovRg//WYcniM5vQ/GNtFsz0Q4ST6UjEtaKL4B47jwwvXcSL9BnXjeK\r\nUhYx7SGApSfrOzhErI4TxSfsIe6xw30Y/BSHYeJTuKVDlATT3J6xUD22HgN/\r\nh+QOCHEDom9rZ2TjcrUOSiwvg08/5b91PmEFbhoABVBdv+yqsL7lENj4qi++\r\n3hQyl8hFzKaGRL32oM0bCMI86GMV0RWkM9o192lW24Xbb4cRMpmIGBuusIvZ\r\nqGtqDFHFDM7AoEzgxtkqyKZu8K91M2B+hjCiwOwvONRQBpLeky0eUP/38GFL\r\nOhggz7HMqB1kGtQV8IM4sTQJ6AOeLDQD1Pa/vrmr01glRNEI+7/MJu61HVIT\r\nY0NF0jKwdJJTdfcX7FLZPKlUnyxjznEUzMuQqhrTCqIjjyQ6Ypu+WIviHQZV\r\nEiSI4GGUNwU0RjDXMy5IKaiVySUvnnNk43pbZyHvxrAjCmb5rJQ1vb9haW/T\r\nu20jTAnjO5MPoWQCVz8B5yhyiVMt//bdQnkL3gCRIlqE2wN5okb6CBB3vFVm\r\nnNvrykJmKYJyNmZn3odls13IX79Y4XmOSDKL4ugbCoee/W42MN9AcZpbl9aB\r\nsn8Zd7djOh0iSAXOOUqMCpwln3wFLpdTM1pgP2CioHKVRnLHvSfGAiFeF9qK\r\nvS/ZcmivR7oogDp7qbKyhLQls3twiGB9+Os=\r\n=BVIT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unist-util-lsp_1.0.0_1661701967725_0.43615725547821715"},"_hasShrinkwrap":false},"1.0.1":{"name":"unist-util-lsp","version":"1.0.1","description":"Utility to convert between unist and language server protocol","license":"MIT","keywords":["unist","util","utility","lsp","language-server-protocol"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-lsp.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-lsp/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"contributors":[{"name":"Remco Haszing","email":"remcohaszing@gmail.com"}],"sideEffects":false,"type":"module","exports":"./index.js","dependencies":{"@types/unist":"^2.0.0","vscode-languageserver-types":"^3.0.0"},"devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.53.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test/index.js","test-coverage":"c8 --100 --reporter lcov npm run test-api","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},"types":"./index.d.ts","gitHead":"acec331c3dbb4cf788cf0aa7a176b9ffd9fc0f74","homepage":"https://github.com/syntax-tree/unist-util-lsp#readme","_id":"unist-util-lsp@1.0.1","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-vjHo9iijlmUNKQp6W9w3NnasnN11w9MTArF6DShGI81Om2s04v8Ac2MKYjPhe6ETCC4Jpk1sEG6y7kzYdwirRA==","shasum":"0318121fe16c5dd2d6f98e4fcb44ee990f5cc021","tarball":"https://registry.npmjs.org/unist-util-lsp/-/unist-util-lsp-1.0.1.tgz","fileCount":7,"unpackedSize":12712,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH86ZAhFd4L2SP1aWpZNQLPXZqpHi/gvRSLhCgxMeywpAiBxl93BpijoAZ8cRnqYfwv9fYz49XSykuBjMBKRQxDaFg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzsLDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKGQ/9F/al81dFlXBcQo8Mp1+tymtef8/ASoKhypQC0IGZa48eAizz\r\nm952iJdTJmVqhjfC86fsG1n9rW9hOvWMP3GsA/JPZz2WLaYBDDlBWNj2Gu4Z\r\nDkGc86v5MEN4mm9Q/rs7Pg7hp4S7hVIKl6vxDDeihofmkdrfeFysl8wyz5QQ\r\nTqxOqLkYhOfh/Nm3SVQ35Xx7b6uqyEjGEM8lvHUZpcKzQdcLx8d74zVncjhS\r\nuHizMFbqc8YE0jPWE2NMqknmko59rjmW419iLSnDu7usF/hWCCX9aZ0CpX2N\r\nnc+AGdn4FOZuv29Xhc/uYWGpOrJL8hZKtp4D0u/m6KgOBcmj6UYXad03x/dH\r\nI88rG8L/jEehpARq86eJeLobGjZg6aiJ23LiA8zLq537h2xbLyXmdu11Ip8F\r\nQzyIjtCyBDITiV13XAbRBs1L3a48dpSiudsUEDMOMPIMxsYvpBbAZAHFwQkd\r\nhKIDOTiy80OT66G2vaI2h+KinPpmyC2loMJp/n4CK+/RvV6jOiM/aINojs9A\r\nadRornUfN8CGUsQ8mpJcygXU1ceGvjyAQs1bbZ+KwiEoArmu+/NuC7xrnmQ8\r\nn+VK4ivUOjPQWykKnYTecKBbjGw2fguyyb3vUAj4kZQMJ/6gmKUh2MKWjOte\r\nwohBpoll4/lLE/I6RG+F5pAwvO81pL0Gr4s=\r\n=ZzrT\r\n-----END PGP SIGNATURE-----\r\n"},"_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/unist-util-lsp_1.0.1_1674494659255_0.8604944902328258"},"_hasShrinkwrap":false},"1.0.2":{"name":"unist-util-lsp","version":"1.0.2","description":"Utility to convert between unist and language server protocol","license":"MIT","keywords":["unist","util","utility","lsp","language-server-protocol"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-lsp.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-lsp/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"contributors":[{"name":"Remco Haszing","email":"remcohaszing@gmail.com"}],"sideEffects":false,"type":"module","exports":"./index.js","dependencies":{"@types/unist":"^2.0.0","vscode-languageserver-types":"^3.0.0"},"devDependencies":{"@types/node":"^20.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","xo":"^0.54.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test/index.js","test-coverage":"c8 --100 --reporter lcov npm run test-api","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},"types":"./index.d.ts","gitHead":"b8dc42f9bf237f0729186a07c46667f69b93773f","homepage":"https://github.com/syntax-tree/unist-util-lsp#readme","_id":"unist-util-lsp@1.0.2","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-yzRJoA+thD+euCtKNFnaNX1RsjGqgnwu6Q0ef+ZurLGACVtDhTiD8q6r6CZIOYktpvSOiHypZZXhLMGNHqzA6A==","shasum":"b6788ca8ec009d7a730f099e8c17af0a619233a1","tarball":"https://registry.npmjs.org/unist-util-lsp/-/unist-util-lsp-1.0.2.tgz","fileCount":7,"unpackedSize":12869,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC73tv8h237Y32UmN3XVmff/WsmkVPWhmA2E6HfOzr+fAiA01fhC+sw++BFP1I6nPKM0S5RFRgzDavMn81C1rlZNxw=="}]},"_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/unist-util-lsp_1.0.2_1685010564936_0.6178162263314955"},"_hasShrinkwrap":false},"1.0.3":{"name":"unist-util-lsp","version":"1.0.3","description":"Utility to convert between unist and language server protocol","license":"MIT","keywords":["unist","util","utility","lsp","language-server-protocol"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-lsp.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-lsp/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"contributors":[{"name":"Remco Haszing","email":"remcohaszing@gmail.com"}],"sideEffects":false,"type":"module","exports":"./index.js","dependencies":{"@types/unist":"^2.0.0","vscode-languageserver-types":"^3.0.0"},"devDependencies":{"@types/node":"^20.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","xo":"^0.54.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test/index.js","test-coverage":"c8 --100 --reporter lcov npm run test-api","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},"types":"./index.d.ts","gitHead":"8b59920b95b4baaf57e57f90af63378077d45572","homepage":"https://github.com/syntax-tree/unist-util-lsp#readme","_id":"unist-util-lsp@1.0.3","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-qx7+GDBVfooTkfrtZm6+Ve8ksb1d8kr4cCPHjfZXwe5SIW7J8RBXoaweXg3r9Be+X96JcBZPcC8wt234BgUkyw==","shasum":"02d726ef1d919d9a2ca679b19708fd98082a7577","tarball":"https://registry.npmjs.org/unist-util-lsp/-/unist-util-lsp-1.0.3.tgz","fileCount":7,"unpackedSize":12905,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpFUcVQCRVE9WaDdbieuLiPC1IRUpgI21KEwkP36ocRAiEA2Zuwbl0QgFRMeKEXY1xBpY2DPI858N4D1WPALznKuDg="}]},"_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/unist-util-lsp_1.0.3_1685527307968_0.5957159889850265"},"_hasShrinkwrap":false},"2.0.0":{"name":"unist-util-lsp","version":"2.0.0","description":"Utility to convert between unist and language server protocol","license":"MIT","keywords":["unist","util","utility","lsp","language-server-protocol"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-lsp.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-lsp/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"contributors":[{"name":"Remco Haszing","email":"remcohaszing@gmail.com"}],"sideEffects":false,"type":"module","exports":"./index.js","dependencies":{"@types/unist":"^3.0.0","vscode-languageserver-types":"^3.0.0"},"devDependencies":{"@types/node":"^20.0.0","c8":"^8.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","xo":"^0.54.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test/index.js","test-coverage":"c8 --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"bracketSpacing":false,"semi":false,"singleQuote":true,"tabWidth":2,"trailingComma":"none","useTabs":false},"remarkConfig":{"plugins":["remark-preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"ignoreCatch":true,"strict":true},"xo":{"prettier":true},"gitHead":"e713786f90663e9efe74f99388f7160602a8c33d","types":"./index.d.ts","homepage":"https://github.com/syntax-tree/unist-util-lsp#readme","_id":"unist-util-lsp@2.0.0","_nodeVersion":"20.0.0","_npmVersion":"9.7.2","dist":{"integrity":"sha512-5+1v9j0c7k2glELomBIb7MKw6fLbeyU0EVqNDF5tpG30syLupVGHAlZvR0YZW0MeEfOD0EhpIqPWO5oBFCJ2Uw==","shasum":"d68473910f0b7e4eeb7ef3310a2a06bacb160376","tarball":"https://registry.npmjs.org/unist-util-lsp/-/unist-util-lsp-2.0.0.tgz","fileCount":7,"unpackedSize":13100,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5vKwp4EYEvsjxr/wumyGnEvmhrZiKKacLL2A+sQtPYAiBx7grqMYWEfru0DhMs4rOFtk+d621CUpj3/qjg8MehLA=="}]},"_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/unist-util-lsp_2.0.0_1688741437362_0.6258494372943622"},"_hasShrinkwrap":false},"2.1.0":{"name":"unist-util-lsp","version":"2.1.0","description":"Utility to convert between unist and language server protocol","license":"MIT","keywords":["unist","util","utility","lsp","language-server-protocol"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-lsp.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-lsp/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"contributors":[{"name":"Remco Haszing","email":"remcohaszing@gmail.com"}],"sideEffects":false,"type":"module","exports":"./index.js","dependencies":{"@types/unist":"^3.0.0","vscode-languageserver-types":"^3.0.0"},"devDependencies":{"@types/node":"^20.0.0","c8":"^8.0.0","prettier":"^3.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","xo":"^0.56.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --log-level warn && xo --fix","test-api":"node --conditions development test/index.js","test-coverage":"c8 --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"bracketSpacing":false,"semi":false,"singleQuote":true,"tabWidth":2,"trailingComma":"none","useTabs":false},"remarkConfig":{"plugins":["remark-preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"ignoreCatch":true,"strict":true},"xo":{"prettier":true},"gitHead":"7e9a4e7af24f65cf8afbf18754d864bce4e9de58","types":"./index.d.ts","homepage":"https://github.com/syntax-tree/unist-util-lsp#readme","_id":"unist-util-lsp@2.1.0","_nodeVersion":"20.0.0","_npmVersion":"9.7.2","dist":{"integrity":"sha512-ICI1PWbalSfOrsdosGk+WXdZBvdjhZVjbkgHOzKFdkCdzBpVEi8GjsVTAG6NR3VLGcwTOGLj/+k4L0HwGQYvEQ==","shasum":"7aaa4b87fedc5c86e994fa69c49b5e598e503a54","tarball":"https://registry.npmjs.org/unist-util-lsp/-/unist-util-lsp-2.1.0.tgz","fileCount":7,"unpackedSize":14529,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSCPFklb8zcZRbHer2MxRHmDn0x10YQ5leL3vTByjmIAiByDLoBwF+UT+vvf6DlCx4ILXYm6yfVNc3VYnFnAF2LMA=="}]},"_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/unist-util-lsp_2.1.0_1692714285629_0.42158396267160825"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-28T15:52:47.725Z","1.0.0":"2022-08-28T15:52:47.890Z","modified":"2023-08-22T14:24:46.092Z","1.0.1":"2023-01-23T17:24:19.354Z","1.0.2":"2023-05-25T10:29:25.075Z","1.0.3":"2023-05-31T10:01:48.142Z","2.0.0":"2023-07-07T14:50:37.556Z","2.1.0":"2023-08-22T14:24:45.788Z"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"},{"name":"kmck","email":"keith@mcknig.ht"}],"description":"Utility to convert between unist and language server protocol","homepage":"https://github.com/syntax-tree/unist-util-lsp#readme","keywords":["unist","util","utility","lsp","language-server-protocol"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-lsp.git"},"contributors":[{"name":"Remco Haszing","email":"remcohaszing@gmail.com"}],"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-lsp/issues"},"license":"MIT","readme":"# unist-util-lsp\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[unist][] utility to convert positional info between [unist][] and\n[language server protocol][lsp]\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    *   [`fromPlace(place)`](#fromplaceplace)\n    *   [`fromPoint(point)`](#frompointpoint)\n    *   [`fromPosition(unistPosition)`](#frompositionunistposition)\n    *   [`toPoint(lspPosition)`](#topointlspposition)\n    *   [`toPosition(range)`](#topositionrange)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a utility that converts positional info between [unist][] and\n[language server protocol][lsp].\n\n## When should I use this?\n\nYou can use this package when you are dealing with both unist ASTs and a\nlanguage server.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install unist-util-lsp\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {fromPoint, fromPosition, toPoint, toPosition} from 'https://esm.sh/unist-util-lsp@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {fromPoint, fromPosition, toPoint, toPosition} from 'https://esm.sh/unist-util-lsp@2?bundle'\n</script>\n```\n\n## Use\n\nSay we have the following `example.md`:\n\n```markdown\n## Hello **World**!\n```\n\n…and next to it a module `example.js`:\n\n```js\nimport fs from 'node:fs/promises'\nimport {fromMarkdown} from 'mdast-util-from-markdown'\nimport {\n  fromPlace,\n  fromPoint,\n  fromPosition,\n  toPoint,\n  toPosition\n} from 'unist-util-lsp'\n\nconst markdown = String(await fs.readFile('example.md'))\nconst mdast = fromMarkdown(markdown)\n\nconsole.log(mdast.position)\n\nconst range = fromPosition(mdast.position)\n\nconsole.log(range)\n\nconst position = toPosition(range)\n\nconsole.log(position)\n\nconst startPosition = fromPoint(mdast.position.start)\n\nconsole.log(startPosition)\n\nconst startPoint = toPoint(startPosition)\n\nconsole.log(startPoint)\n\nconst fullRange = fromPlace(mdast.position)\n\nconsole.log(fullRange)\n\nconst startRange = fromPlace(mdast.position.start)\n\nconsole.log(startRange)\n```\n\n…now running `node example.js` yields:\n\n```js\n{\n  start: { line: 1, column: 1, offset: 0 },\n  end: { line: 2, column: 1, offset: 20 }\n}\n{ start: { character: 0, line: 0 }, end: { character: 0, line: 1 } }\n{ start: { column: 1, line: 1 }, end: { column: 1, line: 2 } }\n{ character: 0, line: 0 }\n{ column: 1, line: 1 }\n{ start: { character: 0, line: 0 }, end: { character: 0, line: 1 } }\n{ start: { character: 0, line: 0 }, end: { character: 0, line: 0 } }\n```\n\n## API\n\nThis package exports the identifiers [`fromPlace`][api-from-place],\n[`fromPoint`][api-from-point], [`fromPosition`][api-from-position],\n[`toPoint`][api-to-point], and [`toPosition`][api-to-position].\nThere is no default export.\n\n### `fromPlace(place)`\n\nConvert a unist point or position to an LSP range.\n\n###### Parameters\n\n*   `place` ([UnistPoint][point] | [`UnistPosition`][unist-position])\n    — the unist point or position to convert\n\n###### Returns\n\nThe LSP range ([`Range`][range]).\n\n### `fromPoint(point)`\n\nTurn a unist point into an LSP position.\n\n###### Parameters\n\n*   `point` ([`Point`][point])\n    — the unist point to convert\n\n###### Returns\n\nThe LSP position ([`LspPosition`][lsp-position]).\n\n### `fromPosition(unistPosition)`\n\nConvert a unist position to an LSP range.\n\n###### Parameters\n\n*   `unistPosition` ([`UnistPosition`][unist-position])\n    — the unist position to convert\n\n###### Returns\n\nThe LSP range ([`Range`][range]).\n\n### `toPoint(lspPosition)`\n\nConvert a language server protocol position to a unist point.\n\n###### Parameters\n\n*   `lspPosition` ([`LspPosition`][lsp-position])\n    — the LSP position to convert\n\n###### Returns\n\nThe unist point ([`Point`][point]).\n\n### `toPosition(range)`\n\nConvert an LSP range to a unist position.\n\n###### Parameters\n\n*   `range` ([`Range`][range])\n    — the LSP range to convert\n\n###### Returns\n\nThe range converted to a unist position ([`UnistPosition`][unist-position]).\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, `unist-util-lsp@^2`,\ncompatible with Node.js 16.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n*   [`unist`][unist]\n    — specification for abstract syntax trees\n*   [Language server protocol][lsp]\n    — protocol to communicate between editors and language servers\n\n## Contribute\n\nSee [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get\nstarted.\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] © [Remco Haszing][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/syntax-tree/unist-util-lsp/workflows/main/badge.svg\n\n[build]: https://github.com/syntax-tree/unist-util-lsp/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-lsp.svg\n\n[coverage]: https://codecov.io/github/syntax-tree/unist-util-lsp\n\n[downloads-badge]: https://img.shields.io/npm/dm/unist-util-lsp.svg\n\n[downloads]: https://www.npmjs.com/package/unist-util-lsp\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=unist-util-lsp\n\n[size]: https://bundlejs.com/?q=unist-util-lsp\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[lsp]: https://microsoft.github.io/language-server-protocol\n\n[license]: license\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[author]: https://github.com/remcohaszing\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\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[unist]: https://github.com/syntax-tree/unist\n\n[point]: https://github.com/syntax-tree/unist#point\n\n[unist-position]: https://github.com/syntax-tree/unist#position\n\n[lsp-position]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position\n\n[range]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#range\n\n[api-from-place]: #fromplaceplace\n\n[api-from-point]: #frompointpoint\n\n[api-from-position]: #frompositionunistposition\n\n[api-to-point]: #topointlspposition\n\n[api-to-position]: #topositionrange\n","readmeFilename":"readme.md"}