{"id":35231929,"url":"https://github.com/sapphiredev/type","last_synced_at":"2026-04-15T18:35:13.627Z","repository":{"id":37017638,"uuid":"208089138","full_name":"sapphiredev/type","owner":"sapphiredev","description":"A type detection utility for JavaScript","archived":false,"fork":false,"pushed_at":"2026-04-03T21:56:10.000Z","size":21528,"stargazers_count":20,"open_issues_count":12,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T23:26:25.837Z","etag":null,"topics":["hacktoberfest","internals","javascript","sapphire","type","typescript"],"latest_commit_sha":null,"homepage":"https://www.sapphirejs.dev/","language":"TypeScript","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/sapphiredev.png","metadata":{"funding":{"github":["sapphiredev"],"patreon":"sapphire_community","open_collective":"sapphiredev","ko_fi":"sapphirecommunity","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://sapphirejs.dev/paypal"},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-12T15:55:22.000Z","updated_at":"2025-11-28T10:53:48.000Z","dependencies_parsed_at":"2023-10-16T04:00:31.993Z","dependency_job_id":"65baa4ac-6e64-4597-b289-0369f9573244","html_url":"https://github.com/sapphiredev/type","commit_stats":{"total_commits":489,"total_committers":11,"mean_commits":44.45454545454545,"dds":0.49079754601227,"last_synced_commit":"95a015aa2edb471072fb52b60282ac2b8f0c5467"},"previous_names":["dirigeants/type"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/sapphiredev/type","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphiredev%2Ftype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphiredev%2Ftype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphiredev%2Ftype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphiredev%2Ftype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapphiredev","download_url":"https://codeload.github.com/sapphiredev/type/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphiredev%2Ftype/sbom","scorecard":{"id":221235,"data":{"date":"2025-08-04","repo":{"name":"github.com/sapphiredev/type","commit":"180a6b2ed67c527d5b703b279cfbd84c684e79d1"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":5.4,"checks":[{"name":"Maintained","score":10,"reason":"16 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/auto-deprecate.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-build-and-test.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-lint-and-docs.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/continuous-delivery.yml:1","Warn: no topLevel permission defined: .github/workflows/deprecate-on-merge.yml:1","Warn: no topLevel permission defined: .github/workflows/documentation.yml:1","Warn: no topLevel permission defined: .github/workflows/labelsync.yml:1","Warn: no topLevel permission defined: .github/workflows/manual-asset-updater.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/release-updater.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-deprecate.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/auto-deprecate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-and-test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-build-and-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-and-test.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-build-and-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-and-test.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-build-and-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-and-test.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-build-and-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-and-test.yml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-build-and-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-and-test.yml:132: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-build-and-test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-lint-and-docs.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-lint-and-docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-lint-and-docs.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-lint-and-docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-lint-and-docs.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/ci-lint-and-docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/codeql-analysis.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/continuous-delivery.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deprecate-on-merge.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/deprecate-on-merge.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/documentation.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/documentation.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/labelsync.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/labelsync.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/labelsync.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/labelsync.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-asset-updater.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/manual-asset-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-asset-updater.yml:99: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/manual-asset-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-asset-updater.yml:144: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/manual-asset-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-asset-updater.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/manual-asset-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-asset-updater.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/manual-asset-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-asset-updater.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/manual-asset-updater.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-updater.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/release-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-updater.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/release-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-updater.yml:139: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/release-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-updater.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/release-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-updater.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/release-updater.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-updater.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/sapphiredev/type/release-updater.yml/main?enable=pin","Info:   0 out of  19 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  10 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/sapphiredev/.github/.github/SECURITY.md:1","Info: Found linked content: github.com/sapphiredev/.github/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/sapphiredev/.github/.github/SECURITY.md:1","Info: Found text in security policy: github.com/sapphiredev/.github/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.6.0 not signed: https://api.github.com/repos/sapphiredev/type/releases/190780386","Warn: release artifact v2.5.1 not signed: https://api.github.com/repos/sapphiredev/type/releases/165076760","Warn: release artifact v2.5.0 not signed: https://api.github.com/repos/sapphiredev/type/releases/163199854","Warn: release artifact v2.4.4 not signed: https://api.github.com/repos/sapphiredev/type/releases/137801152","Warn: release artifact v2.4.3 not signed: https://api.github.com/repos/sapphiredev/type/releases/132680156","Warn: release artifact v2.6.0 does not have provenance: https://api.github.com/repos/sapphiredev/type/releases/190780386","Warn: release artifact v2.5.1 does not have provenance: https://api.github.com/repos/sapphiredev/type/releases/165076760","Warn: release artifact v2.5.0 does not have provenance: https://api.github.com/repos/sapphiredev/type/releases/163199854","Warn: release artifact v2.4.4 does not have provenance: https://api.github.com/repos/sapphiredev/type/releases/137801152","Warn: release artifact v2.4.3 does not have provenance: https://api.github.com/repos/sapphiredev/type/releases/132680156"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (26) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T02:33:26.657Z","repository_id":37017638,"created_at":"2025-08-17T02:33:26.658Z","updated_at":"2025-08-17T02:33:26.658Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31855199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":["hacktoberfest","internals","javascript","sapphire","type","typescript"],"created_at":"2025-12-30T02:54:17.450Z","updated_at":"2026-04-15T18:35:13.615Z","avatar_url":"https://github.com/sapphiredev.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n![Sapphire Logo](https://raw.githubusercontent.com/sapphiredev/assets/main/banners/SapphireCommunity.png)\n\n# @sapphire/type\n\n**A type detection utility for JavaScript.**\n\n[![GitHub](https://img.shields.io/github/license/sapphiredev/type)](https://github.com/sapphiredev/type/blob/main/LICENSE.md)\n[![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/type?logo=webpack\u0026style=flat-square)](https://bundlephobia.com/result?p=@sapphire/type)\n[![npm](https://img.shields.io/npm/v/@sapphire/type?color=crimson\u0026logo=npm\u0026style=flat-square)](https://www.npmjs.com/package/@sapphire/type)\n\n\u003c/div\u003e\n\n---\n\n**Table of Contents**\n\n- [Description](#description)\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Basic Usage](#basic-usage)\n- [Buy us some doughnuts](#buy-us-some-doughnuts)\n- [Contributors](#contributors)\n\n## Description\n\nSometimes there is a need to know what a value's type of something is, this package exists to satisfy those needs by\nimplementing a parser that can retrieve the type of the value recursively and process a string similar to TypeScript's\ntypes.\n\n## Features\n\n- Written in TypeScript\n- Bundled with Rollup so it can be used in NodeJS and browsers\n- Offers CommonJS, ESM and UMD bundles\n- Fully tested\n\n## Installation\n\n```sh\nyarn add @sapphire/type\n# npm install @sapphire/type\n```\n\n## Usage\n\n**Note:** While this section uses `require`, the imports match 1:1 with ESM imports. For example\n`const { Type } = require('@sapphire/type')` equals `import { Type } from '@sapphire/type'`.\n\n**Note:** When using ESM syntax you can also default-import `Type` class: `import Type from '@sapphire/type'`.\n\n**Note:** The internal functions of `getPromiseDetails` and `getProxyDetails` are also exported. If you don't know what\nthese are, then you need not be concerned about this.\n\n### Basic Usage\n\n```typescript\n// Import the Type class\nconst { Type } = require('@sapphire/type');\n\n// Define a Type with an array of two numbers\nconst type = new Type([1, 2]);\n\nconsole.log(type.toString());\n// Logs: Array\u003cnumber\u003e\n```\n\n---\n\n## Buy us some doughnuts\n\nSapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are\namazing people who may still want to donate just to show their appreciation. Thank you very much in advance!\n\nWe accept donations through Open Collective, Ko-fi, PayPal, Patreon and GitHub Sponsorships. You can use the buttons\nbelow to donate through your method of choice.\n\n|   Donate With   |                       Address                       |\n| :-------------: | :-------------------------------------------------: |\n| Open Collective | [Click Here](https://sapphirejs.dev/opencollective) |\n|      Ko-fi      |      [Click Here](https://sapphirejs.dev/kofi)      |\n|     Patreon     |    [Click Here](https://sapphirejs.dev/patreon)     |\n|     PayPal      |     [Click Here](https://sapphirejs.dev/paypal)     |\n\n## Contributors\n\nPlease make sure to read the [Contributing Guide][contributing] before making a pull request.\n\nThank you to all the people who already contributed to Sapphire!\n\n\u003ca href=\"https://github.com/sapphiredev/type/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=sapphiredev/type\" /\u003e\n\u003c/a\u003e\n\n[contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md\n","funding_links":["https://github.com/sponsors/sapphiredev","https://patreon.com/sapphire_community","https://opencollective.com/sapphiredev","https://ko-fi.com/sapphirecommunity","https://sapphirejs.dev/paypal"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphiredev%2Ftype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapphiredev%2Ftype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphiredev%2Ftype/lists"}