{"id":39456165,"url":"https://github.com/zakodium/zpl-handlebars","last_synced_at":"2026-01-18T04:36:13.871Z","repository":{"id":57406629,"uuid":"213588760","full_name":"zakodium/zpl-handlebars","owner":"zakodium","description":"ZPL label templating using Handlebars","archived":false,"fork":false,"pushed_at":"2021-03-26T12:53:41.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-20T10:41:51.731Z","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/zakodium.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","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":"2019-10-08T08:28:51.000Z","updated_at":"2023-11-11T20:24:21.000Z","dependencies_parsed_at":"2022-09-05T06:41:20.814Z","dependency_job_id":null,"html_url":"https://github.com/zakodium/zpl-handlebars","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zakodium/zpl-handlebars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fzpl-handlebars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fzpl-handlebars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fzpl-handlebars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fzpl-handlebars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zakodium","download_url":"https://codeload.github.com/zakodium/zpl-handlebars/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fzpl-handlebars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":[],"created_at":"2026-01-18T04:36:13.821Z","updated_at":"2026-01-18T04:36:13.866Z","avatar_url":"https://github.com/zakodium.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zpl-handlebars\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\nZPL label templating using Handlebars.\n\n## Installation\n\n`$ npm i zpl-handlebars`\n\n## ZPL References\n\n- [Specification](https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf).\n- [Cheat sheet](./ZPL_CHEAT_SHEET.md)\n\n## Usage\n\n```js\nimport { compile } from 'zpl-handlebars';\nimport { Image } from 'image-js';\n\nconst template = `\n^XA\n^FO150,125^ADN,36,20^FD{{data.value1}}^FS\n^FO100,100^XGR:{{images.myImage}},1,1^FS\n^XZ\n`;\n\nconst compiled = compile(template);\n\n// prettier-ignore\nconst myImage = new Image(8, 4, [ // Or load any image with Image.load()\n    0,   0,   0,   0,   0,   0,   0,   0,\n  255,   0, 255, 255,   0, 255, 255, 255,\n  255, 255,   0, 255, 255, 255, 255,   0,\n  255, 255, 255, 255, 255, 255, 255, 255\n  // @ts-ignore\n], { kind: 'GREY' });\n\nconst zpl = compiled({ data: { value1: 'TEST' }, images: { myImage } });\n/*\n~DGR:00000000.GRF,4,1,\nFF\n48\n21\n00\n^XA\n^FO150,125^ADN,36,20^FDTEST^FS\n^FO100,100^XGR:00000000.GRF,1,1^FS\n^XZ\n*/\n```\n\n## Helpers\n\n### toFixed\n\nFormats a value using `Number(value).toFixed(decimals)`.  \nThe `decimals` parameter is optional and defaults to `2`.\n\n```\n{{toFixed data.value}}\n{{toFixed data.value 3}}\n```\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/zpl-handlebars.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/zpl-handlebars\n[travis-image]: https://img.shields.io/travis/com/zakodium/zpl-handlebars/master.svg?style=flat-square\n[travis-url]: https://travis-ci.com/zakodium/zpl-handlebars\n[codecov-image]: https://img.shields.io/codecov/c/github/zakodium/zpl-handlebars.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/zakodium/zpl-handlebars\n[download-image]: https://img.shields.io/npm/dm/zpl-handlebars.svg?style=flat-square\n[download-url]: https://www.npmjs.com/package/zpl-handlebars\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakodium%2Fzpl-handlebars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakodium%2Fzpl-handlebars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakodium%2Fzpl-handlebars/lists"}