{"id":14985728,"url":"https://github.com/kzemlyak/diffcalculus","last_synced_at":"2025-04-11T22:11:31.759Z","repository":{"id":110656482,"uuid":"138541264","full_name":"kzemlyak/diffcalculus","owner":"kzemlyak","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-20T16:51:52.000Z","size":165,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T04:36:16.942Z","etag":null,"topics":["diff","file-differences","functional-programming","ini","json","yaml","yml"],"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/kzemlyak.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}},"created_at":"2018-06-25T03:54:20.000Z","updated_at":"2023-07-29T13:49:25.000Z","dependencies_parsed_at":"2023-04-14T18:31:50.401Z","dependency_job_id":null,"html_url":"https://github.com/kzemlyak/diffcalculus","commit_stats":null,"previous_names":["haliont/project-lvl2-s281","fizzbuzz123/diffcalculus","kzemlyak/diffcalculus","tr3nbolon3/diffcalculus"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzemlyak%2Fdiffcalculus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzemlyak%2Fdiffcalculus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzemlyak%2Fdiffcalculus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzemlyak%2Fdiffcalculus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kzemlyak","download_url":"https://codeload.github.com/kzemlyak/diffcalculus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487694,"owners_count":21112190,"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","file-differences","functional-programming","ini","json","yaml","yml"],"created_at":"2024-09-24T14:11:33.216Z","updated_at":"2025-04-11T22:11:31.726Z","avatar_url":"https://github.com/kzemlyak.png","language":"JavaScript","readme":"# Вычислитель отличий\r\n[![Maintainability](https://api.codeclimate.com/v1/badges/1cf9581b08325df5bc71/maintainability)](https://codeclimate.com/github/Haliont/diffcalculus/maintainability)\r\n\r\n[![Build Status](https://travis-ci.org/Haliont/diffcalculus.svg?branch=master)](https://travis-ci.org/Haliont/diffcalculus)\r\n\r\nCLI-приложение, принимает 2 файла, сравнивает их и выводит различия.\r\n\r\n## Установка\r\n```npm install -g diffcalculus```\r\n\r\n## Использование\r\n```\r\nUsage: gendiff [options] \u003cfirstConfig\u003e \u003csecondConfig\u003e\r\n\r\nCompares two configuration files and shows a difference.\r\n\r\nOptions:\r\n\r\n  -V, --version  output the version number\r\n  -f, --format   [type]  Output format\r\n  -h, --help     output usage information\r\n```\r\n\r\nтипы поддерживаемых файлов: *.ini, *.json, *.yml\r\n\r\nтипы вывода дифа: standart (по умолчанию), plain, json\r\n\r\n## Использоание как библиотеки\r\n```npm install --save-dev diffcalculus```\r\n```\r\nimport genDiff from 'diffcalculus';\r\nconst diff = genDiff(\u003cfirstPathToFile\u003e, \u003csecondPathToFile\u003e)\r\nconsole.log(diff);\r\n```\r\n\r\n## Примеры вывода\r\n### standart:\r\n```\r\n{\r\n    common: {\r\n        setting1: Value 1\r\n      - setting2: 200\r\n      + setting3: {\r\n            key: value\r\n        }\r\n      - setting3: true\r\n        setting6: {\r\n            key: value\r\n          + ops: vops\r\n        }\r\n      + setting4: blah blah\r\n      + setting5: {\r\n            key5: value5\r\n        }\r\n    }\r\n  + follow: false\r\n}\r\n```\r\n\r\n### plain:\r\n```\r\nProperty 'timeout' was updated. From 50 to 20\r\nProperty 'proxy' was removed\r\nProperty 'follow' was removed\r\nProperty 'verbose' was added with value: true\r\n```\r\n\r\n### json:\r\n```\r\n[\r\n  {\r\n    \"key\": \"group1\",\r\n    \"type\": \"nested\",\r\n    \"children\": [\r\n      {\r\n        \"key\": \"baz\",\r\n        \"type\": \"updated\",\r\n        \"oldValue\": \"bas\",\r\n        \"newValue\": \"bars\"\r\n      },\r\n      {\r\n        \"key\": \"foo\",\r\n        \"type\": \"unchanged\",\r\n        \"value\": \"bar\"\r\n      },\r\n      {\r\n        \"key\": \"nest\",\r\n        \"type\": \"updated\",\r\n        \"oldValue\": {\r\n          \"key\": \"value\"\r\n        },\r\n        \"newValue\": \"str\"\r\n      }\r\n    ]\r\n  },\r\n  {\r\n    \"key\": \"group2\",\r\n    \"type\": \"removed\",\r\n    \"value\": {\r\n      \"abc\": \"12345\"\r\n    }\r\n  }\r\n]\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkzemlyak%2Fdiffcalculus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkzemlyak%2Fdiffcalculus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkzemlyak%2Fdiffcalculus/lists"}