{"id":16888077,"url":"https://github.com/otbe/snapshot-dir","last_synced_at":"2025-03-20T06:43:35.025Z","repository":{"id":57364635,"uuid":"89746542","full_name":"otbe/snapshot-dir","owner":"otbe","description":"Takes a snapshot of a folder","archived":false,"fork":false,"pushed_at":"2017-04-29T16:05:30.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T03:32:53.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/otbe.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":"2017-04-28T21:36:21.000Z","updated_at":"2019-09-02T20:31:14.000Z","dependencies_parsed_at":"2022-09-13T21:11:21.827Z","dependency_job_id":null,"html_url":"https://github.com/otbe/snapshot-dir","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otbe%2Fsnapshot-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otbe%2Fsnapshot-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otbe%2Fsnapshot-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otbe%2Fsnapshot-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otbe","download_url":"https://codeload.github.com/otbe/snapshot-dir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244506046,"owners_count":20463465,"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-10-13T16:48:46.890Z","updated_at":"2025-03-20T06:43:35.007Z","avatar_url":"https://github.com/otbe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snapshot-dir\n[![Build Status](https://travis-ci.org/otbe/snapshot-dir.svg?branch=master)](https://travis-ci.org/otbe/snapshot-dir)\n\nEvery now and then I need a little tool which takes a snapshot of a folder and compares it to an older one. Imagine we program a build/bundler tool which uses this technqiue to ensure \tintegrity after changes to the core.\n\n*snapshot-dir* exports four functions to generate and compare snapshots.\n\n## API\n### snapshot\n```\nsnapshot(path: string): Promise\u003cSnapshotResult\u003e\n```\nGenerates a snapshot from a given ```path```. The result is an object with filenames as keys and hashs as values.\n\n### snapshotCompare\n```\nsnapshotCompare(path: string, currentSnap: SnapshotResult): Promise\u003cIDiff\u003e\n```\nCompares a given ```path``` with a given ```currentSnap``` and returns a [deep-diff](https://www.npmjs.com/package/deep-diff#simple-examples) result object, which is undefined for no diff or a changeset.\n\n### snapshotSync\nSame as ```snapshot``` but sync.\n\n### snapshotCompareSync\nSame as ```snapshotCompare``` but sync.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotbe%2Fsnapshot-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotbe%2Fsnapshot-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotbe%2Fsnapshot-dir/lists"}