{"id":19904427,"url":"https://github.com/alloc/log-format","last_synced_at":"2026-06-09T12:31:40.233Z","repository":{"id":107078299,"uuid":"275222803","full_name":"alloc/log-format","owner":"alloc","description":"Evaluate console.log format specifiers before logging","archived":false,"fork":false,"pushed_at":"2023-08-03T06:18:23.000Z","size":6,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T21:02:30.997Z","etag":null,"topics":["console-log","format","pretty-format","string"],"latest_commit_sha":null,"homepage":"","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/alloc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-26T18:32:02.000Z","updated_at":"2020-06-26T18:43:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"aee83170-8f9c-4ef3-9667-3e52ba891ce7","html_url":"https://github.com/alloc/log-format","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alloc/log-format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Flog-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Flog-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Flog-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Flog-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alloc","download_url":"https://codeload.github.com/alloc/log-format/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Flog-format/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34107865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["console-log","format","pretty-format","string"],"created_at":"2024-11-12T20:28:24.692Z","updated_at":"2026-06-09T12:31:40.216Z","avatar_url":"https://github.com/alloc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @alloc/log-format\n\nEvaluate `console.log` format specifiers (eg: `%O`) before logging.\n\n**Format specifiers:**\n- `%O` Use [`pretty-format`](https://www.npmjs.com/package/pretty-format) before insertion\n- `%s` Use `String(value)` before insertion\n- `%f` Use `Number(value)` before insertion\n- `%d` Use `Math.floor(value)` before insertion (alias: `%i`)\n\n### Example\n\n```js\nimport format from '@alloc/log-format'\n\nformat('a: %O, b: %O', /.+/, new Date)\n// =\u003e 'a: /.+/, b: 2020-06-26T18:39:40.258Z'\n\nformat({ a: [1, 2], b: new Set([3, 4]) })\n// =\u003e '{\"a\": [1, 2], \"b\": Set {3, 4}}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Flog-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falloc%2Flog-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Flog-format/lists"}