{"id":21831338,"url":"https://github.com/nodef/extra-javascript-text","last_synced_at":"2026-05-09T01:31:18.593Z","repository":{"id":45809338,"uuid":"476759917","full_name":"nodef/extra-javascript-text","owner":"nodef","description":"Utilities for processing JavaScript text.","archived":false,"fork":false,"pushed_at":"2025-04-08T17:18:58.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-11T15:38:47.765Z","etag":null,"topics":["comment-match-function","comment-replace-function","comments","correct-declarations","export-symbol","export-symbol-match-function","export-symbol-replace-function","export-symbols","extra","for-each-comment","import-symbol","import-symbol-match-function","import-symbol-replace-function","javascript","jsdoc-symbol","jsdoc-symbol-match-function","jsdoc-symbol-replace-function","string-match-function","string-replace-function","text"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/extra-javascript-text","language":"TypeScript","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/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-01T14:47:23.000Z","updated_at":"2025-04-08T17:18:59.000Z","dependencies_parsed_at":"2025-04-12T03:09:46.055Z","dependency_job_id":"6ab94b26-746b-42f9-a789-ac1f6472d79a","html_url":"https://github.com/nodef/extra-javascript-text","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nodef/extra-javascript-text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-javascript-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-javascript-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-javascript-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-javascript-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/extra-javascript-text/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-javascript-text/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32804060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["comment-match-function","comment-replace-function","comments","correct-declarations","export-symbol","export-symbol-match-function","export-symbol-replace-function","export-symbols","extra","for-each-comment","import-symbol","import-symbol-match-function","import-symbol-replace-function","javascript","jsdoc-symbol","jsdoc-symbol-match-function","jsdoc-symbol-replace-function","string-match-function","string-replace-function","text"],"created_at":"2024-11-27T19:09:45.214Z","updated_at":"2026-05-09T01:31:18.580Z","avatar_url":"https://github.com/nodef.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Utilities for processing JavaScript text.\u003cbr\u003e\n📦 [Node.js](https://www.npmjs.com/package/extra-javascript-text),\n🌐 [Web](https://www.npmjs.com/package/extra-javascript-text.web),\n📜 [Files](https://unpkg.com/extra-javascript-text/),\n📰 [Docs](https://nodef.github.io/extra-javascript-text/).\n\nThis package is available in *Node.js* and *Web* formats. To use it on the web,\nsimply use the `extra_javascript_text` global variable after loading with a `\u003cscript\u003e`\ntag from the [jsDelivr CDN].\n\n\u003e Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).\n\n[jsDelivr CDN]: https://cdn.jsdelivr.net/npm/extra-javascript-text.web/index.js\n\n\u003cbr\u003e\n\n```javascript\nconst fs          = require('fs');\nconst xjavascript = require('extra-javascript-text');\n\n\nfunction main() {\n  var txt = fs.readFileSync('src/index.ts', 'utf8').replace(/\\r?\\n/, '\\n');\n\n  xjavascript.importSymbols(txt);\n  // []\n\n  xjavascript.exportSymbols(txt);\n  // [\n  //   {\n  //     full: 'export function tagStrings',\n  //     name: 'tagStrings',\n  //     kind: 'function',\n  //     isDefault: false\n  //   },\n  //   {\n  //     full: 'export function untagStrings',\n  //     name: 'untagStrings',\n  //     kind: 'function',\n  //     isDefault: false\n  //   },\n  //   ...\n  // ]\n\n  xjavascript.jsdocSymbols(txt);\n  // [\n  //   {\n  //     full: '/**\\r\\n' +\n  //       ' * Get index of string end.\\r\\n' +\n  //       ' * @param txt javascript text\\r\\n' +\n  //       ' * @param i index of string begin\\r\\n' +\n  //       ' */\\r\\n' +\n  //       ' function indexOfClosingString',\n  //     jsdoc: '/**\\r\\n' +\n  //       ' * Get index of string end.\\r\\n' +\n  //       ' * @param txt javascript text\\r\\n' +\n  //       ' * @param i index of string begin\\r\\n' +\n  //       ' */',\n  //     name: 'indexOfClosingString',\n  //     kind: 'function',\n  //     isExported: false,\n  //     isDefault: false\n  //   },\n  //   {\n  //     full: '/**\\r\\n' +\n  //       ' * Tag strings in javascript text and remove them.\\r\\n' +\n  //       ' * @param txt javascript text\\r\\n' +\n  //       ' * @returns [updated javascript text, tags]\\r\\n' +\n  //       ' */\\r\\n' +\n  //       'export function tagStrings',\n  //     jsdoc: '/**\\r\\n' +\n  //       ' * Tag strings in javascript text and remove them.\\r\\n' +\n  //       ' * @param txt javascript text\\r\\n' +\n  //       ' * @returns [updated javascript text, tags]\\r\\n' +\n  //       ' */',\n  //     name: 'tagStrings',\n  //     kind: 'function',\n  //     isExported: true,\n  //     isDefault: false\n  //   },\n  //   ...\n  // ]\n}\nmain();\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## Index\n\n| Property | Description |\n|  ----  |  ----  |\n| [tagStrings] | Tag strings in javascript text and remove them. |\n| [untagStrings] | Untag strings in javascript text by adding them back. |\n| [forEachComment] | Match links in javascript text. |\n| [comments] | Get comments in javascript text. |\n| [replaceComments] | Replace comments in javascript text. |\n| [tagComments] | Tag comments in javascript text and remove them. |\n| [untagComments] | Untag comments in javascript text by adding them back. |\n| [uncomment] | Remove comments from javascript text. |\n| [forEachJsdocSymbol] | Match jsdoc symbols in javascript text. |\n| [jsdocSymbols] | Get jsdoc symbols in javascript text. |\n| [replaceJsdocSymbols] | Replace jsdoc symbols in javascript text. |\n| [forEachExportSymbol] | Match export symbols in javascript text. |\n| [exportSymbols] | Get export symbols in javascript text. |\n| [replaceExportSymbols] | Replace export symbols in javascript text. |\n| [forEachImportSymbol] | Match import symbols in javascript text. |\n| [importSymbols] | Get import symbols in javascript text. |\n| [replaceImportSymbols] | Replace import symbols in javascript text. |\n| [correctDeclarations] | Correct type declarations after generation. |\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n[![](https://img.youtube.com/vi/rJYcZX8na_Q/maxresdefault.jpg)](https://www.youtube.com/watch?v=rJYcZX8na_Q)\u003cbr\u003e\n[![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)\n[![DOI](https://zenodo.org/badge/476759917.svg)](https://zenodo.org/badge/latestdoi/476759917)\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-javascript-text)\n\n[tagStrings]: https://nodef.github.io/extra-javascript-text/modules.html#tagStrings\n[untagStrings]: https://nodef.github.io/extra-javascript-text/modules.html#untagStrings\n[forEachComment]: https://nodef.github.io/extra-javascript-text/modules.html#forEachComment\n[comments]: https://nodef.github.io/extra-javascript-text/modules.html#comments\n[replaceComments]: https://nodef.github.io/extra-javascript-text/modules.html#replaceComments\n[tagComments]: https://nodef.github.io/extra-javascript-text/modules.html#tagComments\n[untagComments]: https://nodef.github.io/extra-javascript-text/modules.html#untagComments\n[uncomment]: https://nodef.github.io/extra-javascript-text/modules.html#uncomment\n[forEachJsdocSymbol]: https://nodef.github.io/extra-javascript-text/modules.html#forEachJsdocSymbol\n[jsdocSymbols]: https://nodef.github.io/extra-javascript-text/modules.html#jsdocSymbols\n[replaceJsdocSymbols]: https://nodef.github.io/extra-javascript-text/modules.html#replaceJsdocSymbols\n[forEachExportSymbol]: https://nodef.github.io/extra-javascript-text/modules.html#forEachExportSymbol\n[exportSymbols]: https://nodef.github.io/extra-javascript-text/modules.html#exportSymbols\n[replaceExportSymbols]: https://nodef.github.io/extra-javascript-text/modules.html#replaceExportSymbols\n[forEachImportSymbol]: https://nodef.github.io/extra-javascript-text/modules.html#forEachImportSymbol\n[importSymbols]: https://nodef.github.io/extra-javascript-text/modules.html#importSymbols\n[replaceImportSymbols]: https://nodef.github.io/extra-javascript-text/modules.html#replaceImportSymbols\n[correctDeclarations]: https://nodef.github.io/extra-javascript-text/modules.html#correctDeclarations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-javascript-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fextra-javascript-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-javascript-text/lists"}