{"id":21522158,"url":"https://github.com/hugoalh-studio/is-primitive-js","last_synced_at":"2025-07-16T07:30:56.194Z","repository":{"id":230343298,"uuid":"779141654","full_name":"hugoalh-studio/is-primitive-js","owner":"hugoalh-studio","description":"A JavaScript module to determine whether the item is a primitive.","archived":false,"fork":false,"pushed_at":"2024-03-29T06:28:40.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-30T06:26:17.762Z","etag":null,"topics":["is","javascript","js","primitive"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hugoalh-studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-29T06:09:15.000Z","updated_at":"2024-03-29T06:15:05.000Z","dependencies_parsed_at":"2024-03-29T06:25:34.289Z","dependency_job_id":"108bd3fb-2015-4337-bca7-f48f7cca4bae","html_url":"https://github.com/hugoalh-studio/is-primitive-js","commit_stats":null,"previous_names":["hugoalh-studio/is-primitive-js"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh-studio%2Fis-primitive-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh-studio%2Fis-primitive-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh-studio%2Fis-primitive-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh-studio%2Fis-primitive-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugoalh-studio","download_url":"https://codeload.github.com/hugoalh-studio/is-primitive-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226112989,"owners_count":17575438,"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":["is","javascript","js","primitive"],"created_at":"2024-11-24T01:09:28.667Z","updated_at":"2024-11-24T01:09:29.287Z","avatar_url":"https://github.com/hugoalh-studio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Is Primitive (JavaScript)\n\n[**⚖️** MIT](./LICENSE.md)\n\n**🗂️**\n[![GitHub: hugoalh-studio/is-primitive-js](https://img.shields.io/badge/hugoalh--studio/is--primitive--js-181717?logo=github\u0026logoColor=ffffff\u0026style=flat \"GitHub: hugoalh-studio/is-primitive-js\")](https://github.com/hugoalh-studio/is-primitive-js)\n[![NPM: @hugoalh/is-primitive](https://img.shields.io/badge/@hugoalh/is--primitive-CB3837?logo=npm\u0026logoColor=ffffff\u0026style=flat \"NPM: @hugoalh/is-primitive\")](https://www.npmjs.com/package/@hugoalh/is-primitive)\n\n**🆙** ![Latest Release Version](https://img.shields.io/github/release/hugoalh-studio/is-primitive-js?sort=semver\u0026color=2187C0\u0026label=\u0026style=flat \"Latest Release Version\") (![Latest Release Date](https://img.shields.io/github/release-date/hugoalh-studio/is-primitive-js?color=2187C0\u0026label=\u0026style=flat \"Latest Release Date\"))\n\nA JavaScript module to determine whether the item is a primitive.\n\n## 🎯 Target\n\n- Bun ^ v1.0.0\n- Cloudflare Workers\n- Deno \u003e= v1.34.0\n  \u003e **🛡️ Require Permission**\n  \u003e\n  \u003e *N/A*\n- NodeJS \u003e= v16.13.0\n\n### 🔗 Other Edition\n\n- [TypeScript](https://github.com/hugoalh-studio/is-primitive-ts)\n\n## 🔰 Usage\n\n### Via Installation\n\n\u003e **🎯 Supported Target**\n\u003e\n\u003e - Cloudflare Workers\n\u003e - NodeJS\n\n1. Install via console/shell/terminal:\n    - Via NPM\n      ```sh\n      npm install @hugoalh/is-primitive[@\u003cTag\u003e]\n      ```\n    - Via PNPM\n      ```sh\n      pnpm add @hugoalh/is-primitive[@\u003cTag\u003e]\n      ```\n    - Via Yarn\n      ```sh\n      yarn add @hugoalh/is-primitive[@\u003cTag\u003e]\n      ```\n2. Import at the script (`\u003cScriptName\u003e.js`):\n    ```js\n    import ... from \"@hugoalh/is-primitive\";\n    ```\n    \u003e **ℹ️ Note**\n    \u003e\n    \u003e Although it is recommended to import the entire module, it is also able to import part of the module with sub path if available, please visit [file `package.json`](./package.json) property `exports` for available sub paths.\n\n### Via NPM Specifier\n\n\u003e **🎯 Supported Target**\n\u003e\n\u003e - Bun\n\u003e - Deno\n\n1. Import at the script (`\u003cScriptName\u003e.js`):\n    ```js\n    import ... from \"npm:@hugoalh/is-primitive[@\u003cTag\u003e]\";\n    ```\n    \u003e **ℹ️ Note**\n    \u003e\n    \u003e Although it is recommended to import the entire module, it is also able to import part of the module with sub path if available, please visit [file `package.json`](./package.json) property `exports` for available sub paths.\n\n## 🧩 API\n\n- ```ts\n  function isPrimitive(item: unknown): item is Primitive;\n  ```\n- ```ts\n  type Primitive = bigint | boolean | number | string | symbol | null | undefined;\n  ```\n\n## ✍️ Example\n\n- ```js\n  isPrimitive({});\n  //=\u003e false\n  ```\n- ```js\n  isPrimitive(new Headers());\n  //=\u003e false\n  ```\n- ```js\n  isPrimitive(true);\n  //=\u003e true\n  ```\n- ```js\n  isPrimitive(123n);\n  //=\u003e true\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugoalh-studio%2Fis-primitive-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugoalh-studio%2Fis-primitive-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugoalh-studio%2Fis-primitive-js/lists"}