{"id":16231583,"url":"https://github.com/hustcc/diff-text","last_synced_at":"2025-06-11T07:31:57.370Z","repository":{"id":66093468,"uuid":"94334267","full_name":"hustcc/diff-text","owner":"hustcc","description":"Just get the diff of a simple inline text, simple mode.","archived":false,"fork":false,"pushed_at":"2017-06-16T02:37:25.000Z","size":4,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-03T03:32:55.886Z","etag":null,"topics":["diff","diff-text","text-diff"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hustcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-14T13:31:14.000Z","updated_at":"2023-05-04T15:29:25.000Z","dependencies_parsed_at":"2023-03-10T23:36:53.963Z","dependency_job_id":null,"html_url":"https://github.com/hustcc/diff-text","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"51f68d5b95994ebc28108c0be316d285ad2cf199"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fdiff-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fdiff-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fdiff-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fdiff-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hustcc","download_url":"https://codeload.github.com/hustcc/diff-text/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fdiff-text/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259221872,"owners_count":22823977,"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":["diff","diff-text","text-diff"],"created_at":"2024-10-10T13:06:10.074Z","updated_at":"2025-06-11T07:31:57.336Z","avatar_url":"https://github.com/hustcc.png","language":"JavaScript","readme":"# diff-text\n\n\u003e Inline text diff algorithm. Simplified from [https://neil.fraser.name/writing/diff/](https://neil.fraser.name/writing/diff/). For input text diff in HTML with Chinese input software.\n\n[![Build Status](https://travis-ci.org/ProtoTeam/diff-text.svg?branch=master)](https://travis-ci.org/ProtoTeam/diff-text) [![Coverage Status](https://coveralls.io/repos/github/ProtoTeam/diff-text/badge.svg)](https://coveralls.io/github/ProtoTeam/diff-text)\n\n\n## Usage\n\n\u003e **npm i --save diff-text**\n\n\n```js\nvar diffText = require('diff-text');\n\ndiffText('diff---text', 'diff+++text');\n\n// will get array like below:\n[\n\t[0, 'diff'], // equal\n\t[-1, '---'], // delete\n\t[1, '+++'],  // add\n\t[0, 'text']  // equal\n]\n```\n\n\n## Test \u0026 Perf\n\n```\n\u003e npm run test\n\n\u003e npm run pref\n\ndiff-text x 1,238,388 ops/sec ±1.22% (88 runs sampled)\n```\n\n\n## License\n\nISC@[ProtoTeam](https://github.com/ProtoTeam).\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Fdiff-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhustcc%2Fdiff-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Fdiff-text/lists"}