{"id":18003258,"url":"https://github.com/hungneox/object-map-validator","last_synced_at":"2025-08-21T02:08:53.802Z","repository":{"id":57141217,"uuid":"119988637","full_name":"hungneox/object-map-validator","owner":"hungneox","description":"Object Map Validator","archived":false,"fork":false,"pushed_at":"2018-10-22T17:35:16.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T12:43:55.198Z","etag":null,"topics":["javascript","object-mapper","serverless","validator"],"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/hungneox.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}},"created_at":"2018-02-02T14:01:05.000Z","updated_at":"2018-02-08T11:58:15.000Z","dependencies_parsed_at":"2022-09-05T01:21:09.543Z","dependency_job_id":null,"html_url":"https://github.com/hungneox/object-map-validator","commit_stats":null,"previous_names":["hungneox/serverless-validator"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hungneox/object-map-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungneox%2Fobject-map-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungneox%2Fobject-map-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungneox%2Fobject-map-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungneox%2Fobject-map-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hungneox","download_url":"https://codeload.github.com/hungneox/object-map-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungneox%2Fobject-map-validator/sbom","scorecard":{"id":473471,"data":{"date":"2025-08-11","repo":{"name":"github.com/hungneox/object-map-validator","commit":"44cb1ddc989d31d4d4e3187e5685396753a31fa3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/20 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":"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":"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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 5 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"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-qgmg-gppg-76g5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T14:36:34.001Z","repository_id":57141217,"created_at":"2025-08-19T14:36:34.001Z","updated_at":"2025-08-19T14:36:34.001Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"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":["javascript","object-mapper","serverless","validator"],"created_at":"2024-10-29T23:26:08.090Z","updated_at":"2025-08-21T02:08:53.780Z","avatar_url":"https://github.com/hungneox.png","language":"JavaScript","readme":"# Object Map Validator\n\n[![Build Status](https://travis-ci.org/hungneox/object-map-validator.svg?branch=master)](https://travis-ci.org/hungneox/object-map-validator)\n\nThis object-map validator supports validating `event.body` against a list of expected parameters, and return default values for required fields if they are missing from the request. Under the hood it use [validator](https://www.npmjs.com/package/validator) module.\n\n# Installation\n\n```\nnpm install object-map-validator\n```\n\n# Usage\n\n```javascript\nlet objectMapValidator = require('object-map-validator')\nlet validator = require('validator')\n\nlet resp = objectMapValidator.evaluateParameters(\n    {\n        'id': '100', 'username': 'johndoe'\n    }, [{\n        name: 'id',\n        mappedName: 'customerNo',\n        required: true,\n        validator: validator.isInt\n    },\n    {\n        name: 'username',\n        mappedName: 'customerName',\n        required: true,\n        validator: validator.isAlpha,\n    },\n    {\n        name: 'phone',\n        mappedName: 'phoneNo',\n        required: true,\n        default: '0441122334'\n    }\n])\n\n// resp = { \n//     error: '',\n//     object: { \n//         customerNo: '100',\n//         customerName: 'johndoe',\n//         phoneNo: '0441122334' \n//     },\n//     string: 'customerNo=100\u0026customerName=johndoe\u0026phoneNo=0441122334' \n// }\n```\n\nValidation with options\n\n```javascript\nlet objectMapValidator = require('object-map-validator')\nlet validator = require('validator')\n\nlet resp = objectMapValidator.evaluateParameters(\n    {\n        'age': 17\n    }, [{\n        name: 'age',\n        mappedName: 'iAge',\n        required: true,\n        validator: validator.isInt\n        options: {min: 18}\n    }\n])\n\n// resp = { \n//   error: 'Parameter age failed validation. Expected validator: isInt with options: {\"min\":18}',\n//   object: {},\n//   string: '' \n// }\n\n```\n\n# Development\n\n## Test\n\n```\nnpm test\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungneox%2Fobject-map-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhungneox%2Fobject-map-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungneox%2Fobject-map-validator/lists"}