{"id":22963358,"url":"https://github.com/kettek/icns-endec-js","last_synced_at":"2026-05-01T14:33:33.184Z","repository":{"id":57270916,"uuid":"262730433","full_name":"kettek/icns-endec-js","owner":"kettek","description":"WIP ICNS encoder and decoder ","archived":false,"fork":false,"pushed_at":"2023-10-25T18:18:16.000Z","size":66,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T08:26:15.863Z","etag":null,"topics":["decoder","encoder","endec","icns","icon","javascript","library","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kettek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-10T06:59:23.000Z","updated_at":"2024-04-02T08:59:07.000Z","dependencies_parsed_at":"2024-10-31T16:45:31.112Z","dependency_job_id":null,"html_url":"https://github.com/kettek/icns-endec-js","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.26315789473684215","last_synced_commit":"289c916d8625e6260e71f75a00bfd6c104a50297"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/kettek/icns-endec-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Ficns-endec-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Ficns-endec-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Ficns-endec-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Ficns-endec-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kettek","download_url":"https://codeload.github.com/kettek/icns-endec-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Ficns-endec-js/sbom","scorecard":{"id":556599,"data":{"date":"2025-08-11","repo":{"name":"github.com/kettek/icns-endec-js","commit":"289c916d8625e6260e71f75a00bfd6c104a50297"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T12:31:44.672Z","repository_id":57270916,"created_at":"2025-08-20T12:31:44.672Z","updated_at":"2025-08-20T12:31:44.672Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32501402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["decoder","encoder","endec","icns","icon","javascript","library","nodejs"],"created_at":"2024-12-14T19:34:36.130Z","updated_at":"2026-05-01T14:33:33.164Z","avatar_url":"https://github.com/kettek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ICNS encoder \u0026 decoder\nThis JavaScript library provides an encoder and decoder for ICNS files. At the moment the library is limited to PNG and JPEG 2000-based ICNS entries but it wouldn't be too difficult to expand it further in the future. This limits support to Mac OS 10.5 and up.\n\n## Encoding\n### icnsEndec.encode([IconEntry||Object])\nThe encode function takes an array of [IconEntries](#iconentry) or objects that provide an *OSType* and *buffer* field. It returns a Buffer containing the binary data of the ICNS file.\n\nThe OSType must match one of the supported ones on the [Supported OSType Table](#supported-ostype-table). The buffer field must be a [Buffer](https://nodejs.org/api/buffer.html) or an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).\n\n#### Example\n```\nconst fsPromises = require('fs').promises\nconst icnsEndec  = require('icns-endec')\n\n;(async () =\u003e {\n  // Encode ic07 and ic08 from PNG images.\n  let icnsBuffer = icnsEndec.encode([\n    {\n      OSType: 'ic07',\n      buffer: await fsPromises.readFile('myIcon-128x128.png'),\n    },\n    new icnsEndec.IconEntry('ic08', await fsPromises.readFile('myIcon-256x256.png')),\n  ])\n  \n  // Write out our ICNS file.\n  await fsPromises.writeFile('myIcon.icns', icnsBuffer)\n})()\n```\n\n## Decoding\n\n### icnsEndec.decode(Buffer||ArrayBuffer)\nThe decode function takes a Buffer or an ArrayBuffer that holds the binary data of an ICNS file. It returns an array of IconEntries.\n\n#### Example\n```\nconst fsPromises = require('fs').promises\nconst icnsEndec  = require('icns-endec')\n\n;(async () =\u003e {\n  // Retrieve the icons as an array of IconEntries.\n  let icns = icnsEndec.decode(await fsPromises.readFile('myIcon.icns'))\n  \n  // Write out all icons.\n  for (let icn of icns) {\n    await fsPromises.writeFile(`myIcon-${icn.OSType}.${icn.ext}`)\n  }\n})()\n```\n\n## IconEntry\nThe IconEntry class stores a Buffer, OSType, extension, and image type, where applicable.\n\n### constructor(String, Buffer)\n#### Example\n```\nlet iconEntry = new IconEntry('ic14', await fsPromises.readFile('myPNG-1024x1024.png'))\n```\n\n### buffer\nReturns the IconEntry's buffer.\n\n### type\nReturns the IconEntry's image data type. May be 'PNG' or 'JPEG2000'.\n\n### ext\nReturns the IconEntry's file extension. May be 'png' or 'jp2'.\n\n### OSType\nReturns the OSType of the IconEntry.\n\n## Supported OSType Table\n\n| OSType | Supported|\n|-|-|\n| ICON |   |\n| ICN# |   |\n| icm# |   |\n| icm4 |   |\n| icm8 |   |\n| ics# |   |\n| ics4 |   |\n| ics8 |   |\n| is32 |   |\n| s8mk |   |\n| icl4 |   |\n| icl8 |   |\n| il32 |   |\n| l8mk |   |\n| ich# |   |\n| ich4 |   |\n| ich8 |   |\n| ih32 |   |\n| h8mk |   |\n| it32 |   |\n| t8mk |   |\n| icp4 |   |\n| icp5 |   |\n| icp6 |   |\n| ic07 | x |\n| ic08 | x |\n| ic09 | x |\n| ic10 | x |\n| ic11 | x |\n| ic12 | x |\n| ic13 | x |\n| ic14 | x |\n| ic04 |   |\n| ic05 |   |\n| icsB |   |\n| icsb |   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkettek%2Ficns-endec-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkettek%2Ficns-endec-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkettek%2Ficns-endec-js/lists"}