{"id":19400437,"url":"https://github.com/volem/secure-callback","last_synced_at":"2026-06-08T23:01:41.001Z","repository":{"id":143907933,"uuid":"84455867","full_name":"Volem/secure-callback","owner":"Volem","description":"Securely return to callback","archived":false,"fork":false,"pushed_at":"2017-03-28T14:26:36.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-24T15:07:16.008Z","etag":null,"topics":["callback","returns","secure"],"latest_commit_sha":null,"homepage":"http://nodejs.withvolkan.com/2017/03/13/Type-Definitions/","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/Volem.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":"2017-03-09T15:12:45.000Z","updated_at":"2017-03-20T08:51:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"d473236e-b2da-46bc-858b-78c1164ef6d0","html_url":"https://github.com/Volem/secure-callback","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Volem/secure-callback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volem%2Fsecure-callback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volem%2Fsecure-callback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volem%2Fsecure-callback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volem%2Fsecure-callback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Volem","download_url":"https://codeload.github.com/Volem/secure-callback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volem%2Fsecure-callback/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34083848,"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-08T02:00:07.615Z","response_time":111,"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":["callback","returns","secure"],"created_at":"2024-11-10T11:14:14.074Z","updated_at":"2026-06-08T23:01:40.984Z","avatar_url":"https://github.com/Volem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# secure-callback [![Build Status](https://travis-ci.org/Volem/secure-callback.svg?branch=master)](https://travis-ci.org/Volem/secure-callback)  \n\nWe all check that the callback function is available and if we forget to check we may end up strange errors. So how do we check? Let me write quickly, I believe you will remember :)\n``` javascript\nif (callback) {\n    callback(err);\n}\nreturn;\n```\nThis is a very simple package to remove these lines of code and also provides custom message when you forgot to provide callback. A simple class which takes 3 arguments and all optional. \n* First argument determines if you want to throw exception or not. \n* Second argument is a custom message when you provide something else than a function by mistake. (Default message : callback is not a function.)\n* Third argument is also a custom message when you forgot to provide the callback function. (Default message : callback should be defined.)\n\n## Usage\n``` javascript\nvar securecallback = require('secure-callback');\nvar secure = new securecallback();\n...\n// In your function that has callback use secure.respond\n// Pass your callback and any number of arguments for your callback.\nfunction callbackTest(callback) {\n    secure.respond(callback, null, 'success messsage');\n}\n```\n\nEnjoy..\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolem%2Fsecure-callback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolem%2Fsecure-callback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolem%2Fsecure-callback/lists"}