{"id":28264082,"url":"https://github.com/clems71/co-sha1","last_synced_at":"2025-07-06T20:05:52.878Z","repository":{"id":57201854,"uuid":"71135671","full_name":"clems71/co-sha1","owner":"clems71","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-09T13:07:36.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T19:01:12.633Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clems71.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}},"created_at":"2016-10-17T12:24:20.000Z","updated_at":"2016-10-17T12:24:39.000Z","dependencies_parsed_at":"2022-09-18T09:32:16.947Z","dependency_job_id":null,"html_url":"https://github.com/clems71/co-sha1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clems71/co-sha1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clems71%2Fco-sha1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clems71%2Fco-sha1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clems71%2Fco-sha1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clems71%2Fco-sha1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clems71","download_url":"https://codeload.github.com/clems71/co-sha1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clems71%2Fco-sha1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260519107,"owners_count":23021410,"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":"2025-05-20T08:12:41.737Z","updated_at":"2025-07-06T20:05:52.872Z","avatar_url":"https://github.com/clems71.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# co-sha1\n\n## Install\n\n    $ npm install co-sha1\n\n## Doc\n- `sha1(string)` : synchronous version, returns an hex string containing the SHA1 sum\n- `sha1(Buffer)` : synchronous version, returns an hex string containing the SHA1 sum\n- `sha1(ReadableStream)` : asynchronous version, returns a Promise\\\u003cstring\\\u003e, resolved to SHA1 sum once finished\n\n## Usage\n\n```js\nconst fs = require('fs')\nconst sha1 = require('co-sha1')\n\nasync function test () {\n  // Synchronous with strings and Buffers\n  console.log(sha1('hello world!'))\n  // → 430ce34d020724ed75a196dfc2ad67c77772d169\n\n  console.log(sha1(new Buffer('hello world!')))\n  // → 430ce34d020724ed75a196dfc2ad67c77772d169\n\n  // Asynchronous with Streams\n  console.log(await sha1(fs.createReadStream('hello.txt')))\n  // → 430ce34d020724ed75a196dfc2ad67c77772d169\n}\n\ntest().catch(console.error);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclems71%2Fco-sha1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclems71%2Fco-sha1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclems71%2Fco-sha1/lists"}