{"id":22604705,"url":"https://github.com/wangtao0101/parse-comment-es6","last_synced_at":"2025-03-28T21:28:02.527Z","repository":{"id":57319320,"uuid":"91940858","full_name":"wangtao0101/parse-comment-es6","owner":"wangtao0101","description":"A fast comment parse for es6 without dependence, support loc and range","archived":false,"fork":false,"pushed_at":"2017-06-13T01:53:37.000Z","size":336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T08:49:13.609Z","etag":null,"topics":["commnet","es6","javascript","parser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangtao0101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-21T07:41:24.000Z","updated_at":"2017-05-25T13:12:30.000Z","dependencies_parsed_at":"2022-08-25T20:40:47.540Z","dependency_job_id":null,"html_url":"https://github.com/wangtao0101/parse-comment-es6","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fparse-comment-es6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fparse-comment-es6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fparse-comment-es6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fparse-comment-es6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangtao0101","download_url":"https://codeload.github.com/wangtao0101/parse-comment-es6/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246103019,"owners_count":20723890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commnet","es6","javascript","parser"],"created_at":"2024-12-08T13:10:29.335Z","updated_at":"2025-03-28T21:28:02.506Z","avatar_url":"https://github.com/wangtao0101.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parse-comment-es6\n[![NPM version](https://img.shields.io/npm/v/parse-comment-es6.svg?style=flat)](https://www.npmjs.com/package/parse-comment-es6)\n[![Build Status](https://img.shields.io/travis/wangtao0101/parse-comment-es6.svg?style=flat)](https://travis-ci.org/wangtao0101/parse-comment-es6)\n\nA new comment parse for es6\n\n## Install\n```\nnpm install parse-comment-es6 --save\nyarn add parse-comment-es6\n```\n\n## Usage\n```\nimport strip from 'parse-comment-es6';\nconst p = '`aaa`\\n//abc\\n';\nconsole.log(strip(p, { comment: true, range: true, loc: true, raw: true }));\n// =\u003e\n//    text: '`aaa`\\n\\n',\n//    comments: [\n//        {\n//             type: 'LineComment',\n//             raw: '//abc'\n//             loc: {\n//                 start: {\n//                     line: 1,\n//                     column: 0,\n//                 },\n//                 end: {\n//                     line: 1,\n//                     column: 5,\n//                 },\n//             },\n//             range: {\n//                 start: 6,\n//                 end: 11,\n//             },\n//       }\n//   ]\n// };\n```\n\n## Option\n\n| Property      | Description                                     | Type       | Default |\n|-----------|------------------------------------------|------------|--------|\n| comment  | need to return comment list | boolean | false\n| raw  | need to return comment raw, comment option should be true | boolean | false\n| loc  | need to return comment loc, comment option should be true | boolean | false\n| range  | need to return comment range, comment option should be true | boolean | false\n\n\n## Test\ntest past using jquery, react, react-dom\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/wangtao0101/parse-comment-es6/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangtao0101%2Fparse-comment-es6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangtao0101%2Fparse-comment-es6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangtao0101%2Fparse-comment-es6/lists"}