{"id":28236983,"url":"https://github.com/bytebodger/is-a-regular-object-react","last_synced_at":"2025-10-09T19:32:27.651Z","repository":{"id":57167215,"uuid":"341353162","full_name":"bytebodger/is-a-regular-object-react","owner":"bytebodger","description":"Utility function for identifying regular JavaScript objects in React projects","archived":false,"fork":false,"pushed_at":"2021-02-24T17:24:13.000Z","size":166,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T12:42:10.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@toolz/is-a-regular-object-react","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/bytebodger.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":"2021-02-22T22:16:37.000Z","updated_at":"2021-02-24T17:24:15.000Z","dependencies_parsed_at":"2022-08-30T13:20:20.556Z","dependency_job_id":null,"html_url":"https://github.com/bytebodger/is-a-regular-object-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytebodger","download_url":"https://codeload.github.com/bytebodger/is-a-regular-object-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object-react/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259101117,"owners_count":22805206,"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-05-19T00:17:13.117Z","updated_at":"2025-10-09T19:32:22.618Z","avatar_url":"https://github.com/bytebodger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-a-regular-object-react\n\n`is-a-regular-object-react` is a tiny, dead-simple utility function for identifying regular JavaScript objects. In JavaScript, a `NULL` will show a `typeof` \"object\". An array will also show a `typeof` \"object\". This function returns `TRUE` for non-`NULL`, non-array objects - and it returns `FALSE` for everything else.\n\n**NOTE:** This package is for React projects. It utilizes the `react` library to check for valid React elements - which are idenitified in normal JS as having `typeof` \"object\". If you are not working in a React project, or if you have no need to distinguish React elements from \"regular\" JS objects, you should consider using `@toolz/is-a-regular-object`.\n\n## Usage\n\nAfter installation, import the package:\n\n```javascript\nimport { isARegularObject } from '@toolz/is-a-regular-object-react';\n```\n\n### isARegularObject()\n\n```javascript\nconst API = {\n   arguments: {\n      value: {\n         required,\n         format: any,\n      },\n   },\n   returns: Boolean,\n}\n```\n\n```javascript\nisARegularObject({}); // true\nisARegularObject({one: 'uno', two: 'dos'}); // true\nisARegularObject({numbers: [1, 2, 3], letters: ['a', 'b', 'c']}); // true\n\nisARegularObject(null); // false\nisARegularObject([]); // false\nisARegularObject([1, 2, 3]); // false\nisARegularObject(''); // false\nisARegularObject('object'); // false\nisARegularObject(() =\u003e console.log('foo')); // false\nisARegularObject(\u003c\u003e\u003c/\u003e); // false\nisARegularObject(\u003c\u003e\u003cdiv\u003efoo\u003c/div\u003e\u003c/\u003e); // false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebodger%2Fis-a-regular-object-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebodger%2Fis-a-regular-object-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebodger%2Fis-a-regular-object-react/lists"}