{"id":23097342,"url":"https://github.com/jccr/tiny-cfi","last_synced_at":"2025-07-05T02:33:51.007Z","repository":{"id":38270018,"uuid":"174282461","full_name":"jccr/tiny-cfi","owner":"jccr","description":"Generate EPUB CFI steps for a node in 40 lines of code!","archived":false,"fork":false,"pushed_at":"2022-12-08T16:15:15.000Z","size":48,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T14:55:40.098Z","etag":null,"topics":["cfi","dom","epub","epub3","html"],"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/jccr.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-03-07T06:07:20.000Z","updated_at":"2022-03-15T21:24:58.000Z","dependencies_parsed_at":"2023-01-25T07:46:12.722Z","dependency_job_id":null,"html_url":"https://github.com/jccr/tiny-cfi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jccr/tiny-cfi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccr%2Ftiny-cfi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccr%2Ftiny-cfi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccr%2Ftiny-cfi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccr%2Ftiny-cfi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jccr","download_url":"https://codeload.github.com/jccr/tiny-cfi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccr%2Ftiny-cfi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263671764,"owners_count":23494035,"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":["cfi","dom","epub","epub3","html"],"created_at":"2024-12-16T22:57:19.670Z","updated_at":"2025-07-05T02:33:50.987Z","avatar_url":"https://github.com/jccr.png","language":"JavaScript","readme":"# Tiny CFI\n\nGenerate a minimal CFI for a target node, with only the DOM as a dependency.\n\n## Caveats\n\nA bunch. This is very rudimentary.\nOnly the element steps are generated. \nNo ranges, no text offsets, no ID assertions.\n\n## Usage\n\n```\ngenerateCfiSteps(target, root)\n```\n\n## Example\n\nGiven the HTML:\n\n```\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"div-2\"\u003e\n      \u003cp id=\"p-2\"\u003e\n        Hello world\n      \u003c/p\u003e\n      \u003cdiv\u003e\u003c/div\u003e\n      \u003cdiv id=\"div-6\"\u003e\u003c/div\u003e\n      \u003cdiv\u003e\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nRunning `npm i \u0026\u0026 npm test` should print out `/4/2/6`\n\nRefer to `main.js` as a code example.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjccr%2Ftiny-cfi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjccr%2Ftiny-cfi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjccr%2Ftiny-cfi/lists"}