{"name":"@textlint/markdown-to-ast","version":"6.1.0-alpha.bbfc8f6d","description":"Parse Markdown to AST with location info.","homepage":"https://github.com/textlint/textlint/tree/master/packages/@textlint/markdown-to-ast/","bugs":{"url":"https://github.com/textlint/textlint/issues"},"license":"MIT","author":{"name":"azu"},"files":["lib/","src/"],"main":"lib/markdown-parser.js","repository":{"type":"git","url":"https://github.com/textlint/textlint.git"},"scripts":{"build":"cross-env NODE_ENV=production babel src --out-dir lib --source-maps","clean":"rimraf lib/","example:build":"browserify example/js/index.js -o example/app/app.js","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.{js,ts}\"","watch":"babel src --out-dir lib --watch --source-maps"},"dependencies":{"@textlint/ast-node-types":"^4.1.0-alpha.bbfc8f6d","debug":"^2.1.3","remark-frontmatter":"^1.2.0","remark-parse":"^5.0.0","structured-source":"^3.0.2","traverse":"^0.6.6","unified":"^6.1.6"},"devDependencies":{"@textlint/ast-tester":"^2.1.0-alpha.bbfc8f6d","@textlint/ast-traverse":"^2.1.0-alpha.bbfc8f6d","babel-cli":"^6.24.1","babel-preset-env":"^1.4.0","babel-preset-jsdoc-to-assert":"^4.0.0","babel-preset-power-assert":"^1.0.0","babel-register":"^6.24.1","browserify":"^14.3.0","cross-env":"^4.0.0","mkdirp":"^0.5.1","mocha":"^5.1.1","power-assert":"^1.4.2","rimraf":"^2.6.2"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @textlint/markdown-to-ast\n\nParse Markdown to AST with location info.\n\nThis library is not parser itself, it dependent on [wooorm/remark](https://github.com/wooorm/remark).\n\n> Markdown -> remark -> markdown-to-ast -> `TxtNode`s\n\nThe AST consists of `TxtNode`s.\nA `TxtNode` of the AST has following properties:\n\n- `loc` - Nodes have line and column-based location info.\n- `range` - Nodes have an index-based location range (array).\n- `raw` - Node have a `raw` text.\n- `value` - Node have a `value` of text.\n\nThe interface are defined in [textlint/txtnode.md](https://github.com/textlint/textlint/blob/master/docs/txtnode.md \"textlint/txtnode.md at master · textlint/textlint\")\n\nThis library is a part of [textlint/textlint](https://github.com/textlint/textlint \"textlint/textlint\").\n\n**If you need to markdown parser, please use [wooorm/remark](https://github.com/wooorm/remark) directly.**\n\n## DEMO\n\n- [textlint AST explorer](https://textlint.github.io/astexplorer/ \"textlint AST explorer\")\n\n## Installation\n\n```\nnpm install @textlint/markdown-to-ast\n```\n\n## Usage\n\n```sh\nvar parse = require(\"@textlint/markdown-to-ast\").parse;\nvar markdown = \"It's a *text*\";\nvar AST = parse(markdown);\n/*\n{\n    \"type\": \"Document\",\n    \"children\": [\n        {\n            \"type\": \"Paragraph\",\n            \"children\": [\n                {\n                    \"type\": \"Str\",\n                    \"value\": \"It's a \",\n                    \"loc\": {\n                        \"start\": {\n                            \"line\": 1,\n                            \"column\": 0\n                        },\n                        \"end\": {\n                            \"line\": 1,\n                            \"column\": 7\n                        }\n                    },\n                    \"range\": [\n                        0,\n                        7\n                    ],\n                    \"raw\": \"It's a \"\n                },\n                {\n                    \"type\": \"Emphasis\",\n                    \"children\": [\n                        {\n                            \"type\": \"Str\",\n                            \"value\": \"text\",\n                            \"loc\": {\n                                \"start\": {\n                                    \"line\": 1,\n                                    \"column\": 8\n                                },\n                                \"end\": {\n                                    \"line\": 1,\n                                    \"column\": 12\n                                }\n                            },\n                            \"range\": [\n                                8,\n                                12\n                            ],\n                            \"raw\": \"text\"\n                        }\n                    ],\n                    \"loc\": {\n                        \"start\": {\n                            \"line\": 1,\n                            \"column\": 7\n                        },\n                        \"end\": {\n                            \"line\": 1,\n                            \"column\": 13\n                        }\n                    },\n                    \"range\": [\n                        7,\n                        13\n                    ],\n                    \"raw\": \"*text*\"\n                }\n            ],\n            \"loc\": {\n                \"start\": {\n                    \"line\": 1,\n                    \"column\": 0\n                },\n                \"end\": {\n                    \"line\": 1,\n                    \"column\": 13\n                }\n            },\n            \"range\": [\n                0,\n                13\n            ],\n            \"raw\": \"It's a *text*\"\n        }\n    ],\n    \"loc\": {\n        \"start\": {\n            \"line\": 1,\n            \"column\": 0\n        },\n        \"end\": {\n            \"line\": 1,\n            \"column\": 13\n        }\n    },\n    \"range\": [\n        0,\n        13\n    ],\n    \"raw\": \"It's a *text*\"\n}\n*/\n```\n\nIf you want to know real use-case, please see [textlint/textlint](https://github.com/textlint/textlint \"textlint/textlint\").\n\n## Tests\n\n```\nnpm test\n```\n\n### Create fixtures\n\nSee [tools/](tools/) directory.\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## License\n\nMIT\n","licenseText":"Copyright (c) 2015 azu\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@textlint/markdown-to-ast@6.1.0-alpha.bbfc8f6d","dist":{"shasum":"a09f690ed264932a1703a3a2e7b834908c33ebe6","tarball":"http://registry-npm.ywwl.com/@textlint/markdown-to-ast/download/@textlint/markdown-to-ast-6.1.0-alpha.bbfc8f6d.tgz","fileCount":15,"unpackedSize":28173,"integrity":"sha512-M2Gyqg8bUaBRO2FHPpYilnIBRlV8OOKzbIBuKfeuMgM+YflOWllMZvHqAVWEmtV+h0w4H8HTvRQLMaH7/7PGvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBH+ukGcm8hilHYW0bpxDwrlVi++tsL/Bseu4XAQVdHvAiEAtm1e/1fDlmc4f+radKd5kQp5MG9bU8i3aKnLc4F1N2g="}],"size":7678,"noattachment":false,"key":"/@textlint/markdown-to-ast/-/@textlint/markdown-to-ast-6.1.0-alpha.bbfc8f6d.tgz"},"maintainers":[{"email":"0x6b.npmjs@gmail.com","name":"0x6b"},{"email":"azuciao@gmail.com","name":"azu"},{"email":"azuciao+textlint@gmail.com","name":"textlint-user"}],"_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-to-ast_6.1.0-alpha.bbfc8f6d_1531715204577_0.5099473102052208"},"_hasShrinkwrap":false,"publish_time":1531715204670,"_cnpm_publish_time":1531715204670,"dist-tags":{"beta":"12.0.0-beta.3","canary":"6.1.0-alpha.0f2fd6f9","latest":"15.8.0","next":"13.4.2-next.0"}}