{"id":28236992,"url":"https://github.com/bytebodger/is-a-regular-object","last_synced_at":"2025-07-31T06:06:15.582Z","repository":{"id":57167221,"uuid":"341345361","full_name":"bytebodger/is-a-regular-object","owner":"bytebodger","description":"Utility function for identifying regular JavaScript objects","archived":false,"fork":false,"pushed_at":"2021-02-24T17:09:42.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T00:17:31.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@toolz/is-a-regular-object","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-22T21:41:59.000Z","updated_at":"2021-02-24T17:09:44.000Z","dependencies_parsed_at":"2022-08-30T13:10:15.416Z","dependency_job_id":null,"html_url":"https://github.com/bytebodger/is-a-regular-object","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","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytebodger","download_url":"https://codeload.github.com/bytebodger/is-a-regular-object/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebodger%2Fis-a-regular-object/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259101127,"owners_count":22805208,"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.774Z","updated_at":"2025-06-10T15:30:55.916Z","avatar_url":"https://github.com/bytebodger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-a-regular-object\n\n`is-a-regular-object` 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 \"vanilla\" JS. As such, it will identify React elements as being \"regular\" objects. If you're working in a React project, you should consider using `@toolz/is-a-regular-object-react`.\n\n## Usage\n\nAfter installation, import the package:\n\n```javascript\nimport { isARegularObject } from '@toolz/is-a-regular-object';\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\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebodger%2Fis-a-regular-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebodger%2Fis-a-regular-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebodger%2Fis-a-regular-object/lists"}