{"id":24070065,"url":"https://github.com/funnbot/node-bugzapper","last_synced_at":"2025-10-04T03:04:25.784Z","repository":{"id":57191112,"uuid":"99646914","full_name":"funnbot/node-bugzapper","owner":"funnbot","description":"Simple bug zapping for your node application. ","archived":false,"fork":false,"pushed_at":"2020-07-30T23:52:24.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-30T11:53:18.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/funnbot.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":"2017-08-08T03:40:58.000Z","updated_at":"2020-07-30T23:52:27.000Z","dependencies_parsed_at":"2022-09-15T22:13:05.732Z","dependency_job_id":null,"html_url":"https://github.com/funnbot/node-bugzapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/funnbot/node-bugzapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnbot%2Fnode-bugzapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnbot%2Fnode-bugzapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnbot%2Fnode-bugzapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnbot%2Fnode-bugzapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funnbot","download_url":"https://codeload.github.com/funnbot/node-bugzapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnbot%2Fnode-bugzapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259785814,"owners_count":22910812,"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":"2025-01-09T15:03:01.138Z","updated_at":"2025-10-04T03:04:20.730Z","avatar_url":"https://github.com/funnbot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-bugzapper\nSimple bug zapping for your node application. \n\n## Example\n\n```js\nconst BugZapper = require(\"bugzapper\");\nconst bz = new BugZapper({\n    showFileName: true\n});\n\nfunction checkDoor(isBarred) {\n    bz.var({isBarred})\n    if (isBarred) {\n        bz.pt\n        return \"move on\"\n    } else {\n        bz.ptm(\"The door should never be unbarred\")\n        return \"open\"\n    }\n}\n\ncheckDoor(true)\n// door.js - Line 6 fired: isBarred = true\n// door.js - Point fired at line 9\n\ncheckDoor(false)\n// door.js - Line 6 fired: isBarred = false\n// door.js - Point fired at line 12: The door should never be unbarred\n```\n\n### Options\n\n```js\n// With Defaults\nconst bz = new BugZapper({\n    showFileName: false, // Show name of file.\n    fullFilePath: false // Show the entire path to file.\n    pointMessage: \"Point fired at line %l\" // Redefine the message for bz.pt and bz.pt(), %l = line number\n    varMessage: \"Line %l fired: %k = %v\" // Redefine the message for bz.var(), %l = line number, %v = the variables mapped as name = value, ...\n    alterVarLN: -1 // Offset the line number shown for bz.var() compared to its location in the code + (moves down) or - (moves up)\n    alterPtLN: 0 // Offset the line number shown for bz.pt and bz.pt() compared to their location in the code + or -\n})\n```\n\n### pt\n\n##### bz.pt - Mark a point in your code to be logged when it is reached.\n```js\nbz.pt; // myfile.js - Point fired at line 152\n```\n\n### ptm()\n\n##### bz.ptm(\\\u003cYour Message\\\u003e) - Mark a point in your code to be logged with a message when it is reached\n```js\nbz.ptm(\"This should never happen\"); // myfile.js - Point fired at line 892: This should never happen\n```\n\n### var()\n\n##### bz.var({variable[, ...]}) - Mark a variable in your code to have its name and value logged when it is reached, must be an object, \n```js\nlet myVar = true\nlet myFalseVar = false\nbz.var({myVar, myFalseVar}) // myfile.js - Line 536 fired: myVar = true, myFalseVar = false\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnbot%2Fnode-bugzapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunnbot%2Fnode-bugzapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnbot%2Fnode-bugzapper/lists"}