{"id":26473011,"url":"https://github.com/unicreators/object-normalizer","last_synced_at":"2026-04-28T17:04:15.806Z","repository":{"id":57312689,"uuid":"89037123","full_name":"unicreators/object-normalizer","owner":"unicreators","description":"object normalizer.","archived":false,"fork":false,"pushed_at":"2017-04-26T00:12:42.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-24T08:49:09.280Z","etag":null,"topics":["javascript","normalize","normalizer","object-normalizer"],"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/unicreators.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-04-22T01:49:41.000Z","updated_at":"2017-04-22T05:11:03.000Z","dependencies_parsed_at":"2022-09-20T23:03:15.938Z","dependency_job_id":null,"html_url":"https://github.com/unicreators/object-normalizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unicreators/object-normalizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicreators%2Fobject-normalizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicreators%2Fobject-normalizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicreators%2Fobject-normalizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicreators%2Fobject-normalizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unicreators","download_url":"https://codeload.github.com/unicreators/object-normalizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicreators%2Fobject-normalizer/sbom","scorecard":{"id":909849,"data":{"date":"2025-08-11","repo":{"name":"github.com/unicreators/object-normalizer","commit":"626b04a0da38184d3a46620e5e8f7d0681d6aa83"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/6 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":"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":"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":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 8 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-24T18:43:04.501Z","repository_id":57312689,"created_at":"2025-08-24T18:43:04.501Z","updated_at":"2025-08-24T18:43:04.501Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","normalize","normalizer","object-normalizer"],"created_at":"2025-03-19T21:50:38.404Z","updated_at":"2026-04-28T17:04:15.770Z","avatar_url":"https://github.com/unicreators.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ObjectNormalizer\n\nobject normalizer.\n\n\n## Install\n\n```sh\n$ npm install object-normalizer\n```\n\n## Usage\n\n### Normal\n\n```js\n\nconst schema = {\n    'prop1': function (value) {\n        if (value == undefined)\n            value = 1;\n        return value;\n    },\n    'prop2': function (value) {\n        if (typeof value !== 'function')\n            throw new Error(`'prop2' must be of Function type.`);\n        return value;\n    }\n};\n\nconst defaultPropertyName = 'prop2';\n\nlet nor = new ObjectNormalizer(schema, defaultPropertyName);\nlet r = nor.normalize(function () { });\n\nconsole.log(r);\n// { prop1: 1, prop2: [Function] }\n\n\n```\n\n\n\n### Multiple\n\n```js\n\nconst schema = {\n    parent1: function (value) {\n        if (value == undefined) value = 'parent1';\n        return value;\n    },\n    parent2: {\n        schema: {\n            'prop1': function (value) {\n                if (value == undefined) value = 1;\n                return value;\n            },\n            'prop2': function (value) {\n                if (typeof value !== 'function')\n                    throw new Error(`'prop2' must be of Function type.`);\n                return value;\n            }\n        },\n        defaultProperty: 'prop2'\n    }\n};\n\nconst defaultPropertyName = 'parent2';\n\nlet nor = new ObjectNormalizer(schema, defaultPropertyName);\nlet r = nor.normalize(function () { return 'hello!'; });\n\nconsole.log(r);\n// { parent1: 'parent1', parent2: { prop1: 1, prop2: [Function] } }\n\nconsole.log(r.parent2.prop2());\n// hello!\n\n```\n\n\n\n### Array\n\n```js\n\nconst schema = {\n    // array\n    'prop1': [function (value) {\n        if (value == undefined)\n            value = 1;\n        return value;\n    }],\n    'prop2': function (value) {\n        if (typeof value !== 'function')\n            throw new Error(`'prop2' must be of Function type.`);\n        return value;\n    },\n    // to array, not validate\n    'prop3': []\n};\n\nconst defaultPropertyName = 'prop2';\n\nlet nor = new ObjectNormalizer(schema, defaultPropertyName);\nlet r = nor.normalize(function () { });\n\nconsole.log(r);\n// { prop1: [], prop2: [Function], prop3: [] }\n\n\n```\n\n\n\n### Root array\n\n```js\n\n// array\nconst schema = [{\n    'prop1': function (value) {\n        if (value == undefined)\n            value = 1;\n        return value;\n    },\n    'prop2': function (value) {\n        if (typeof value !== 'function')\n            throw new Error(`'prop2' must be of Function type.`);\n        return value;\n    }\n}];\n\nconst defaultPropertyName = 'prop2';\n\nlet nor = new ObjectNormalizer(schema, defaultPropertyName);\nlet r = nor.normalize(function () { });\n\nconsole.log(r);\n// [{ prop1: 1, prop2: [Function] }]\n\n\n```\n\n\n\n\n### License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicreators%2Fobject-normalizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funicreators%2Fobject-normalizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicreators%2Fobject-normalizer/lists"}