{"_id":"remark-code-blocks","_rev":"3-4685ec9f6a44ac2b88e2fc5d348c175d","name":"remark-code-blocks","description":"Extract code blocks from an MDAST tree","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"remark-code-blocks","version":"1.0.0","description":"Extract code blocks from an MDAST tree","main":"index.js","scripts":{"prepublish":"npm run test","clean":"rimraf ./*.js coverage .nyc_output","pretest":"npm run build","lint":"xo --fix src/*.js","tap":"tap -Rspec test.js","build":"npm run lint && npm run babel","babel":"babel src -d .","report":"nyc report --reporter=text-lcov | coveralls","test":"nyc npm run tap"},"babel":{"presets":[["env",{"targets":{"node":"current"}}]]},"prettier":{"singleQuote":true},"xo":{"extends":["prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":"error"}},"repository":{"type":"git","url":"git+https://github.com/mrzmmr/remark-code-blocks.git"},"keywords":["remark","util","utility","code","blocks","extract"],"author":{"name":"mrzmmr"},"license":"MIT","bugs":{"url":"https://github.com/mrzmmr/remark-code-blocks/issues"},"homepage":"https://github.com/mrzmmr/remark-code-blocks#readme","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","nyc":"^11.3.0","prettier":"^1.8.2","remark":"^8.0.0","rimraf":"^2.6.2","tap":"^10.7.3","unist-util-is":"^2.1.1","xo":"^0.18.2"},"dependencies":{"unist-util-find-all-after":"^1.0.1"},"gitHead":"b575875a5d457ac8abcb8939b3ba752f3bf125a5","_id":"remark-code-blocks@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"mrzmmr","email":"mrzmmr@gmail.com"},"dist":{"integrity":"sha512-TCX9hoqOPTjJp4FXP58/w2F0B3l5tQyJjRLxdGHeTM3sN2tteD3Rp0+cJ3lw1d/iHeqicJs4uRC3ahEzJTBQbw==","shasum":"9d0e92064d97daaf84cc49a0b73324eb16e1f3d5","tarball":"https://registry.npmjs.org/remark-code-blocks/-/remark-code-blocks-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCbMY7phz2W97ny50yzvN95tnQ30uadDs5/vfRnGkDTQIgC51WmSParP8h9sDweuoIVXy6FpYCfXPWLvKZDVqAabA="}]},"maintainers":[{"name":"mrzmmr","email":"mrzmmr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-code-blocks-1.0.0.tgz_1512499074178_0.07582335267215967"},"directories":{}},"2.0.0":{"name":"remark-code-blocks","version":"2.0.0","description":"Extract code blocks from an MDAST tree","main":"index.js","scripts":{"clean":"rimraf coverage .nyc_output","tap":"tap -Rspec test.js","report":"nyc report --reporter=text-lcov | coveralls","test":"nyc npm run tap"},"repository":{"type":"git","url":"git+https://github.com/mrzmmr/remark-code-blocks.git"},"keywords":["remark","util","utility","code","blocks","extract"],"author":{"name":"Paul Zimmer"},"license":"MIT","bugs":{"url":"https://github.com/mrzmmr/remark-code-blocks/issues"},"homepage":"https://github.com/mrzmmr/remark-code-blocks#readme","devDependencies":{"coveralls":"^3.0.2","nyc":"^13.0.1","remark-parse":"^5.0.0","remark-stringify":"^5.0.0","rimraf":"^2.6.2","tap":"^12.0.1","unified":"^7.0.0"},"gitHead":"e7de7bed7f0e30f8cfe47cddc45ba966fd3d8857","_id":"remark-code-blocks@2.0.0","_npmVersion":"6.1.0","_nodeVersion":"8.9.3","_npmUser":{"name":"mrzmmr","email":"mrzmmr@gmail.com"},"dist":{"integrity":"sha512-fOGsO11vo7ZoqIGoUbuLs8mWnrXoZTNnLOWUCBzHVKtx1dw8y21GpnoWZ5urnGGtZjCiNaJb+vrCU7nIV37JLA==","shasum":"a575a2cba9d7bcd29e160db8ec8220a44d9d0520","tarball":"https://registry.npmjs.org/remark-code-blocks/-/remark-code-blocks-2.0.0.tgz","fileCount":9,"unpackedSize":10608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbl3b9CRA9TVsSAnZWagAAfMMP/3yJ5+mQbZ5CC/7GZmf/\nCJpa0Vdz0h2tNgI3QsQP5wR79C5HMEM7uvkj5AqPViObdH1eEsQMxH9KypnJ\nLBlksTocZvhWAyIHND20rdBH+1ntQOSSu28OgQ5CmaPBHP8Mi6gfZJ/mXwHI\nHGWESbBPdsAb4musxN03zzNWyAgCfG0ky5aBtH5jj+Do59LPPjRSCs+SGxw+\nQ+ZI5SF3w/CajxCFDUT/N3cfAH3/N3tuD63dA8zOGTm7QBEc4IznOMepNwsN\nYnsIZ1NjPvQq0qtKfTzJj7ZfKaLHvyTsejaieP/NE9EOQwIGd2M9nCpvw8Hw\ndlKHnlW0w9Nds2C3anz8Efz4/TKxFtOQyCgNC5hRxMxqQOcUAWJ9lFNPWups\ngkZmkssMPAP99Lv9PvC7ax1c//3WqazskFoPC0UsgzVB+yYJDeqlNCTERB9z\neqdkB6ktvuABZzh1bgajOYHGeolNVd3tdeETLgP/V9hGdUiiFsqYbRIzh7Ht\n2cFEzK8br75C+ZS1AfoGLRhaVjK8SEp72HqVjoIIAKmJiPdTYBIUQulerGGL\nBwTy0IcbdZDJFuQj23UhYxqUro8TXpXwDnz+yjaUyK6M7W8XIVFKXBEIEl3k\n57Q10ppq8sUl6aP36aSyCgM6urJIBSwHlGn1xGBJia+3KqiiwDJ7uDi4kz7I\noHVg\r\n=SAnW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsJvwZd6Py+n2vw0fzt25E8IP2gwe7zmZ1SmyG1v+d3AiAwFNwCqU9h2ATMSIRQ4uRnFfCIAwQ8U0KiibTTrdofwg=="}]},"maintainers":[{"name":"mrzmmr","email":"mrzmmr@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-code-blocks_2.0.0_1536653052489_0.7806238213564729"},"_hasShrinkwrap":false},"2.0.1":{"name":"remark-code-blocks","version":"2.0.1","description":"Extract code blocks from an MDAST tree","main":"index.js","scripts":{"clean":"rimraf coverage .nyc_output","test":"tap --100 -Rspec test.js","report":"nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/mrzmmr/remark-code-blocks.git"},"keywords":["remark","util","utility","code","blocks","extract"],"author":{"name":"Paul Zimmer"},"license":"MIT","bugs":{"url":"https://github.com/mrzmmr/remark-code-blocks/issues"},"homepage":"https://github.com/mrzmmr/remark-code-blocks#readme","devDependencies":{"coveralls":"^3.0.5","remark-parse":"^7.0.0","remark-stringify":"^7.0.1","tap":"^14.5.0","unified":"^8.3.2"},"gitHead":"9764037c6da6e1ef301175459db35c46d7b417a5","_id":"remark-code-blocks@2.0.1","_nodeVersion":"13.3.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-eZ6vfhv6Sv4TNbNYG6kG3ApQp6MRYc9fT4NT9QBPkuYQf51+TAbuMqApZdJdrsjeI9O8TP7noZF1KbadbLk5Lg==","shasum":"582205e01bb4aa8249db652939846b962740fedb","tarball":"https://registry.npmjs.org/remark-code-blocks/-/remark-code-blocks-2.0.1.tgz","fileCount":11,"unpackedSize":12461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7xLbCRA9TVsSAnZWagAAkNcP+QCSQ8NP2hOQM404Nr27\nIOR6wkX+bloh67qF2K4eYnDO3z/WYS36xnJ9h2NZ4KqcqEUKcMdN1jNG5dGs\nAxkbJHMp1Jm6OUwnD99Wn3D6k8CAsQNW5iXLmZkm7S7sIlxe9RGkIroeJv16\npgv3UkGvnSwv6iOU6bY9ccgOI0d7O/iZYyf+bRL1/2dYIIn3ycVXOFjCYhLd\nUYlMid2q0sZtqkiU6HW8DRJt6eVfrtGOTHFh/D97+Vx9uyTmlUoemb6XLHED\n5RgNE7eZzWdeTOwUY0XcTL6elSorhvovDggrFgzTh8wn2g3aml3n+e813MIK\n0zq6cn4CGcvUO18VGld4rq/gMJtefDDHUDCclwlo5x4xaPCZ4LJm3j/3KHbK\npEgq7II/szl+HLf5TVeIBhBpMLGdTBcb1iv4BAKhR2Jm58x7m0ig8pcD49yM\nPvYszjuxYNHLqWKbAV3VnvmMJUu8LMRqwF3Am4BcRgSCRh0JDGFTQUmKopMd\nofKABo8wO/98s5S3/rcBNVHk98gBA1CVB2yFfxabjiEIpC4edF9lCua0hIzn\nGXUz4xBf3SU6FdjPaAyBggrdiL0cO1yLBAKZXWfx26n6BuYsE45Vxq6LVqIj\nZIHcrw837Zxw82Th7vrPEIfOtohegYgwANQ9EjXUGWMmnrrbfrZDRq0iTGVt\np4P+\r\n=LD7A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNxs+jgI0Tqrb4LgVAEG/CQpob2NmGso3Nds2RkhrT8AiBtZs1Fmpiqi+yzwC8vEszisDE55m7wnPbSzAriS4kQgQ=="}]},"maintainers":[{"name":"mrzmmr","email":"mrzmmr@gmail.com"}],"_npmUser":{"name":"mrzmmr","email":"mrzmmr@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-code-blocks_2.0.1_1575949019603_0.8307588421277159"},"_hasShrinkwrap":false}},"readme":"# remark-code-blocks\n\n> [Remark](https://github.com/syntax-tree/remark) plugin to extract `code` nodes from markdown.\n\n[![Travis](https://img.shields.io/travis/mrzmmr/remark-code-blocks.svg)](https://travis-ci.org/mrzmmr/remark-code-blocks)\n[![Coverage\nStatus](https://coveralls.io/repos/github/mrzmmr/remark-code-blocks/badge.svg?branch=master)](https://coveralls.io/github/mrzmmr/remark-code-blocks?branch=master)\n\n## Install\n\n```\nnpm i -S remark-code-blocks\n```\n\n## Usage\n\n```js\nconst toVfile = require('to-vfile')\nconst unified = require('unified')\nconst parser = require('remark-parser')\nconst stringify = require('remark-stringify')\nconst codeblocks = require('remark-code-blocks')\n\nunified()\n    .use(parser)\n    .use(stringify)\n    .use(codeblocks, { /* options */ })\n    .process(toVfile('./example.md'))\n    .then(file => {\n        /* file.data.codeblocks = [ ... ] */\n    })\n```\n\nor use the standalone function which takes a tree as its first argument.\n\n```js\nconst toVfile = require('to-vfile')\nconst unified = require('unified')\nconst parser = require('remark-parser')\nconst { codeblocks } = require('remark-code-blocks')\n\nconst tree = unified().use(parser).parse(toVfile('./example.md'))\nconst code = codeblocks(tree, { /* options */ })\n```\n\n## API\n\n### .use(codeblocks[, options])\nUse as a plugin to extract code nodes.\n\nThe results are stored in `file.data` in a `codeblocks` property by default. You can override the name of the property using `options.name`.\n\n### .codeblocks(tree[, options])\n\nAlso exports a standalone function.\n\n### Options\n\n#### lang\n\nType: `string`\nDefault: `all`\n\nSpecify a language and only extract code nodes with that language. Otherwise `all` code nodes are extracted.\n\n#### name\n\nType: `string`\nDefault: `codeblocks`\n\nSpecify the name of the property in `file.data`\n\n#### formatter\n\nType: `function`\nDefault: none\n\nAdd a function to run over the nodes values before storing them in `file.data`\n\n## License\n\nMIT &copy; Paul Zimmer\n\n","maintainers":[{"name":"mrzmmr","email":"mrzmmr@gmail.com"}],"time":{"modified":"2022-05-15T18:01:29.448Z","created":"2017-12-05T18:37:54.239Z","1.0.0":"2017-12-05T18:37:54.239Z","2.0.0":"2018-09-11T08:04:12.603Z","2.0.1":"2019-12-10T03:36:59.723Z"},"homepage":"https://github.com/mrzmmr/remark-code-blocks#readme","keywords":["remark","util","utility","code","blocks","extract"],"repository":{"type":"git","url":"git+https://github.com/mrzmmr/remark-code-blocks.git"},"author":{"name":"Paul Zimmer"},"bugs":{"url":"https://github.com/mrzmmr/remark-code-blocks/issues"},"license":"MIT","readmeFilename":"readme.md"}