{"id":21365466,"url":"https://github.com/frameable/html-text-weaver","last_synced_at":"2025-07-13T04:31:57.555Z","repository":{"id":42440971,"uuid":"188705337","full_name":"frameable/html-text-weaver","owner":"frameable","description":"Encode html to its component plain-text and meta style parts","archived":false,"fork":false,"pushed_at":"2022-04-06T01:54:13.000Z","size":20,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-05T11:22:11.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/frameable.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":"2019-05-26T16:15:02.000Z","updated_at":"2023-02-02T14:39:27.000Z","dependencies_parsed_at":"2022-09-09T14:41:10.612Z","dependency_job_id":null,"html_url":"https://github.com/frameable/html-text-weaver","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frameable%2Fhtml-text-weaver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frameable%2Fhtml-text-weaver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frameable%2Fhtml-text-weaver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frameable%2Fhtml-text-weaver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frameable","download_url":"https://codeload.github.com/frameable/html-text-weaver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225855955,"owners_count":17534967,"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":[],"created_at":"2024-11-22T07:11:20.362Z","updated_at":"2024-11-22T07:11:21.000Z","avatar_url":"https://github.com/frameable.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# html-text-weaver\nEncode html to its component plain-text and meta style parts\n\n```javascript\n{ encode, decode } = require('html-text-weaver');\n\nconst html = '\u003ch1\u003eHey, you! \u003cb\u003e\u003ci\u003eGet out of there!\u003c/i\u003e\u003c/b\u003e\u003c/h1\u003e';\n\nencode(html);\n\n// {\n//  text: 'Hey, you! Get out of there!',\n//  meta: [ [ 'h1', 0, 27 ], [ 'b', 10, 27 ], [ 'i', 10, 27 ] ] }\n// }\n\ndecode(encode(html))\n\n// '\u003ch1\u003eHey, you! \u003cb\u003e\u003ci\u003eGet out of there!\u003c/i\u003e\u003c/b\u003e\u003c/h1\u003e'\n```\n\n## Functions\n\n### { text, meta } = encode(html)\n\nEncode html into its component plain-text and meta style parts.  Meta is an array of arrays of tag names, start, and end offests.\n\n\n### html = decode({ text, meta })\n\nDecode text and meta parts back into html.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframeable%2Fhtml-text-weaver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fframeable%2Fhtml-text-weaver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframeable%2Fhtml-text-weaver/lists"}