{"id":22710553,"url":"https://github.com/smallhelm/diff-lines","last_synced_at":"2025-08-07T15:31:24.799Z","repository":{"id":80824566,"uuid":"61734423","full_name":"smallhelm/diff-lines","owner":"smallhelm","description":"Given two strings, show the lines that differ. (similar to `git diff`)","archived":false,"fork":false,"pushed_at":"2019-06-17T18:17:02.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-03T05:23:39.722Z","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/smallhelm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-22T16:27:34.000Z","updated_at":"2020-07-30T12:35:40.000Z","dependencies_parsed_at":"2024-06-19T00:21:57.369Z","dependency_job_id":"3ecea646-c481-449c-90c7-01af5319367f","html_url":"https://github.com/smallhelm/diff-lines","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"81a98a6a2eba73c31b2f4f6a9c48f29106aba87f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fdiff-lines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fdiff-lines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fdiff-lines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fdiff-lines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallhelm","download_url":"https://codeload.github.com/smallhelm/diff-lines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229057638,"owners_count":18013289,"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-12-10T12:10:29.503Z","updated_at":"2024-12-10T12:10:30.256Z","avatar_url":"https://github.com/smallhelm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# diff-lines\n\n[![build status](https://secure.travis-ci.org/smallhelm/diff-lines.svg)](https://travis-ci.org/smallhelm/diff-lines)\n\nGiven two strings, show the lines that differ. (similar to `git diff`)\n\n```js\nvar diff = require('diff-lines');\n\nvar a = '';\na += 'one\\n';\na += 'two\\n';\na += 'three\\n';\n\nvar b = '';\nb += 'one\\n';\nb += 'three\\n';\nb += 'four\\n';\n\nconsole.log(diff(a, b));\n```\nOutput:\n```txt\n one\n-two\n three\n+four\n```\n\n## API\n### diff(a, b[, options])\n* `options.n_surrounding` - number of lines surrounding a diff to show. (default -1, show all lines)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fdiff-lines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallhelm%2Fdiff-lines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fdiff-lines/lists"}