{"id":16330390,"url":"https://github.com/robertoachar/whoops","last_synced_at":"2026-05-01T16:33:53.306Z","repository":{"id":110401254,"uuid":"101607807","full_name":"robertoachar/whoops","owner":"robertoachar","description":"An express middleware validator.","archived":false,"fork":false,"pushed_at":"2018-02-20T17:19:08.000Z","size":49,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T04:57:43.319Z","etag":null,"topics":["express","middleware","node","validator"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@robertoachar/whoops","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/robertoachar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-08-28T05:42:58.000Z","updated_at":"2019-04-24T14:57:32.000Z","dependencies_parsed_at":"2023-06-08T20:00:36.550Z","dependency_job_id":null,"html_url":"https://github.com/robertoachar/whoops","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"db00a925ffa6995f30cd41372985798b4e30778b"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/robertoachar/whoops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoachar%2Fwhoops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoachar%2Fwhoops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoachar%2Fwhoops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoachar%2Fwhoops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertoachar","download_url":"https://codeload.github.com/robertoachar/whoops/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoachar%2Fwhoops/sbom","scorecard":{"id":780363,"data":{"date":"2025-08-11","repo":{"name":"github.com/robertoachar/whoops","commit":"db00a925ffa6995f30cd41372985798b4e30778b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/5 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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T04:45:32.635Z","repository_id":110401254,"created_at":"2025-08-23T04:45:32.635Z","updated_at":"2025-08-23T04:45:32.635Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32505106,"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":["express","middleware","node","validator"],"created_at":"2024-10-10T23:19:08.971Z","updated_at":"2026-05-01T16:33:53.286Z","avatar_url":"https://github.com/robertoachar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whoops\n\nGenerated by [OSS Project Generator](http://bit.ly/generator-oss-project).\n\n[![Travis Status][travis-badge]][travis-url]\n[![AppVeyor Status][appveyor-badge]][appveyor-url]\n[![CircleCI Status][circleci-badge]][circleci-url]\n[![Coveralls Status][coveralls-badge]][coveralls-url]\n[![NPM Version][npm-badge]][npm-url]\n[![License][license-badge]][license-url]\n\n\u003e An express middleware validator.\n\nThis validator provides the following features:\n\n* **checkArray(value, [message])**: check if value is an array\n* **checkArrayEmpty(value, [message])**: check if value is an array and not empty\n* **checkBoolean(value, [message])**: check if value is a boolean\n* **checkNumber(value, [message])**: check if value is a number\n* **checkNumberEmpty(value, [message])**: check if value is a number and not zero or negative\n* **checkObjectId(value, [message])**: check if value is an ObjectId (mongoose)\n* **checkString(value, [message])**: check if value is a string\n* **checkStringEmpty(value, [message])**: check if value is a string and not empty\n\n# Installation\n\n* Install package\n\n```bash\n$ npm install --save @robertoachar/whoops\n```\n\n# Usage\n\n* Import whoops\n\n```javascript\nconst express = require('express');\nconst whoops = require('@robertoachar/whoops');\n```\n\n* Initialize whoops\n\n```javascript\nconst app = express();\napp.use(whoops());\n```\n\n* Use whoops\n\n```javascript\napp.post('/', (req, res) =\u003e {\n  req.whoops.checkStringEmpty(req.body.name, 'Enter a name');\n\n  res.json({ name: req.body.name });\n});\n```\n\n* Error Handling\n\n```javascript\napp.use((err, req, res, next) =\u003e {\n  if (err \u0026\u0026 err.name === 'WhoopsError') {\n    return res.status(400).json({ message: err.message }); // Enter a name\n  }\n\n  next(err);\n});\n```\n\n# Development\n\n* Cloning the repo\n\n```bash\n$ git clone https://github.com/robertoachar/whoops.git\n```\n\n* Installing dependencies\n\n```bash\n$ npm install\n```\n\n* Running scripts\n\n| Action                                   | Usage               |\n| ---------------------------------------- | ------------------- |\n| Linting code                             | `npm run lint`      |\n| Running unit tests                       | `npm run jest`      |\n| Running code coverage                    | `npm run coverage`  |\n| Running lint + tests                     | `npm test`          |\n| Sending coverage results to Coveralls.io | `npm run coveralls` |\n\n# Author\n\n[Roberto Achar](https://twitter.com/robertoachar)\n\n# License\n\n[MIT](https://github.com/robertoachar/whoops/blob/master/LICENSE)\n\n[travis-badge]: https://travis-ci.org/robertoachar/whoops.svg?branch=master\n[travis-url]: https://travis-ci.org/robertoachar/whoops\n[appveyor-badge]: https://ci.appveyor.com/api/projects/status/github/robertoachar/whoops?branch=master\u0026svg=true\n[appveyor-url]: https://ci.appveyor.com/project/robertoachar/whoops\n[circleci-badge]: https://circleci.com/gh/robertoachar/whoops/tree/master.svg?style=shield\n[circleci-url]: https://circleci.com/gh/robertoachar/whoops\n[coveralls-badge]: https://coveralls.io/repos/github/robertoachar/whoops/badge.svg?branch=master\n[coveralls-url]: https://coveralls.io/github/robertoachar/whoops?branch=master\n[npm-badge]: https://img.shields.io/npm/v/@robertoachar/whoops.svg\n[npm-url]: https://www.npmjs.com/package/@robertoachar/whoops\n[license-badge]: https://img.shields.io/github/license/robertoachar/whoops.svg\n[license-url]: https://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertoachar%2Fwhoops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertoachar%2Fwhoops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertoachar%2Fwhoops/lists"}