{"id":17472695,"url":"https://github.com/shinnn/is-cwebp-readable","last_synced_at":"2025-04-09T22:54:21.057Z","repository":{"id":26474718,"uuid":"29926485","full_name":"shinnn/is-cwebp-readable","owner":"shinnn","description":"Check if a Buffer/Uint8Array is available for cwebp image source","archived":false,"fork":false,"pushed_at":"2018-12-17T13:49:00.000Z","size":90,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T22:54:15.140Z","etag":null,"topics":["buffer","cwebp","file-format","file-type","javascript","magic-numbers","nodejs","uint8array","webp"],"latest_commit_sha":null,"homepage":"https://npm.runkit.com/is-cwebp-readable","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.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":"2015-01-27T17:49:32.000Z","updated_at":"2019-10-22T14:16:17.000Z","dependencies_parsed_at":"2022-07-25T15:30:06.062Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/is-cwebp-readable","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fis-cwebp-readable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fis-cwebp-readable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fis-cwebp-readable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fis-cwebp-readable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/is-cwebp-readable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125632,"owners_count":21051766,"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":["buffer","cwebp","file-format","file-type","javascript","magic-numbers","nodejs","uint8array","webp"],"created_at":"2024-10-18T17:34:03.935Z","updated_at":"2025-04-09T22:54:21.029Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-cwebp-readable\n\n[![npm version](https://img.shields.io/npm/v/is-cwebp-readable.svg)](https://www.npmjs.com/package/is-cwebp-readable)\n[![Build Status](https://travis-ci.com/shinnn/is-cwebp-readable.svg?branch=master)](https://travis-ci.com/shinnn/is-cwebp-readable)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-cwebp-readable.svg)](https://coveralls.io/github/shinnn/is-cwebp-readable)\n\nCheck if a Buffer/Uint8Array is available for [cwebp](https://developers.google.com/speed/webp/docs/cwebp) image source\n\n```javascript\nconst {readFileSync} = require('fs');\nconst isCwebpReadable = require('is-cwebp-readable');\n\nisCwebpReadable(readFileSync('fixture.png')); //=\u003e true\nisCwebpReadable(readFileSync('fixture.bmp')); //=\u003e false\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install is-cwebp-readable\n```\n\n## API\n\n```javascript\nconst isCwebpReadable = require('is-cwebp-readable');\n```\n\n### isCwebpReadable(*data*)\n\n*data*: [`Buffer`](https://nodejs.org/api/buffer.html#buffer_class_buffer) or [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)  \nReturn: `boolean`\n\nIt returns `true` if the data is [PNG](https://wikipedia.org/wiki/Portable_Network_Graphics), [JPEG](https://wikipedia.org/wiki/JPEG), [TIFF](https://wikipedia.org/wiki/Tagged_Image_File_Format), or [WebP](https://wikipedia.org/wiki/WebP), otherwise `false`.\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fis-cwebp-readable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fis-cwebp-readable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fis-cwebp-readable/lists"}