{"id":18338732,"url":"https://github.com/tableflip/isjpeg","last_synced_at":"2025-04-09T20:35:46.891Z","repository":{"id":57277907,"uuid":"38587669","full_name":"tableflip/isjpeg","owner":"tableflip","description":":rainbow: is that file really (probably) a jpeg‽","archived":false,"fork":false,"pushed_at":"2015-07-05T23:32:53.000Z","size":504,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T07:38:59.858Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/tableflip.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-07-05T23:13:39.000Z","updated_at":"2015-07-05T23:34:10.000Z","dependencies_parsed_at":"2022-09-13T18:51:59.630Z","dependency_job_id":null,"html_url":"https://github.com/tableflip/isjpeg","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fisjpeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fisjpeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fisjpeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fisjpeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tableflip","download_url":"https://codeload.github.com/tableflip/isjpeg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248108342,"owners_count":21049116,"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-11-05T20:15:01.515Z","updated_at":"2025-04-09T20:35:46.870Z","avatar_url":"https://github.com/tableflip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# isjpeg\n**is that file really (probably) a jpeg‽**\n\nCheck the first 2 bytes of the file header to see if it's a JPEG\n\nFor when you just don't trust file extensions anymore.\n\n\n## Usage\n\n**module**\n\n`npm install isjpeg`\n\n```js\nvar isJpeg = require('isjpeg')\n\nisJpeg('/path/to/mysterious/file', function (err, jpeg) {\n  if (err) throw err\n  if (jpeg) {\n    console.log('file is totes JPEG.')\n  } else {\n    console.log('ceci n\\'est pas une JPEG.')  \n  }\n})\n```\n\n**command line**\n\n`npm install -g isjpeg`\n\n```sh\nisjpeg ~/Pictures/\n/Users/oli/Pictures/MagrittePipe.jpg is JPEG\n```\n\n## References\n\n- http://www.mikekunz.com/image_file_header.html\n- http://stackoverflow.com/questions/772388/c-sharp-how-can-i-test-a-file-is-a-jpeg\n- https://github.com/threatstack/libmagic/blob/master/magic/Magdir/jpeg#L12","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Fisjpeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftableflip%2Fisjpeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Fisjpeg/lists"}