{"id":41249926,"url":"https://github.com/dstructs/array-dtype","last_synced_at":"2026-01-23T01:36:25.809Z","repository":{"id":33115552,"uuid":"36753789","full_name":"dstructs/array-dtype","owner":"dstructs","description":"Returns an array data type corresponding to an array constructor name.","archived":false,"fork":false,"pushed_at":"2015-11-28T00:17:28.000Z","size":12,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-25T04:13:42.818Z","etag":null,"topics":[],"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/dstructs.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":"2015-06-02T18:39:22.000Z","updated_at":"2019-08-18T16:45:46.000Z","dependencies_parsed_at":"2022-09-18T00:51:49.141Z","dependency_job_id":null,"html_url":"https://github.com/dstructs/array-dtype","commit_stats":null,"previous_names":["compute-io/array-dtype"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dstructs/array-dtype","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Farray-dtype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Farray-dtype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Farray-dtype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Farray-dtype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dstructs","download_url":"https://codeload.github.com/dstructs/array-dtype/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Farray-dtype/sbom","scorecard":{"id":358138,"data":{"date":"2025-08-11","repo":{"name":"github.com/dstructs/array-dtype","commit":"f1231ff8ad899b1c858d47821fcb8f1dc20f802c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"Code-Review","score":0,"reason":"Found 0/12 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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-18T10:07:27.429Z","repository_id":33115552,"created_at":"2025-08-18T10:07:27.429Z","updated_at":"2025-08-18T10:07:27.429Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"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":[],"created_at":"2026-01-23T01:36:25.270Z","updated_at":"2026-01-23T01:36:25.798Z","avatar_url":"https://github.com/dstructs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"array-dtype\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n\u003e Returns an array data type corresponding to an array constructor name.\n\n\n## Installation\n\n``` bash\n$ npm install dstructs-array-dtype\n```\n\nFor use in the browser, use [browserify][browserify].\n\n\n## Usage\n\n``` javascript\nvar getType = require( 'dstructs-array-dtype' );\n```\n\n#### getType( name )\n\nReturns an `array` data type corresponding to an `array` constructor name.\n\n``` javascript\nvar dtype = getType( 'Float32Array' );\n// returns 'float32'\n\nvar arr = new Float32Array( 10 );\n\ndtype = getType( Object.prototype.toString.call( arr ).slice(8,-1) );\n// returns 'float32'\n\n// Note: not supported in IE\ndtype = getType( arr.constructor.name );\n// returns 'float32'\n```\n\nThe following `array` constructors are supported:\n\n| Constructor | Data Type |\n|:----------|:------------|\n| [`Int8Array`][Int8Array] | int8 | \n| [`Uint8Array`][Uint8Array] | uint8 | \n| [`Uint8ClampedArray`][Uint8ClampedArray] | uint8_clamped |\n| [`Int16Array`][Int16Array] | int16 |\n| [`Uint16Array`][Uint16Array] | uint16 |\n| [`Int32Array`][Int32Array] | int32 |\n| [`Uint32Array`][Uint32Array] | uint32 |\n| [`Float32Array`][Float32Array] | float32 |\n| [`Float64Array`][Float64Array] | float64 |\n| [`Array`][Array] | generic |\n\n\n## Examples\n\n``` javascript\nvar getType = require( 'dstructs-array-dtype' );\n\nconsole.log( getType( 'Int8Array' ) );\n// returns 'int8'\n\nconsole.log( getType( 'Uint8Array' ) );\n// returns 'uint8'\n\nconsole.log( getType( 'Uint8ClampedArray' ) );\n// returns 'uint8_clamped'\n\nconsole.log( getType( 'Int16Array' ) );\n// returns 'int16'\n\nconsole.log( getType( 'Uint16Array' ) );\n// returns 'uint16'\n\nconsole.log( getType( 'Int32Array' ) );\n// returns 'int32'\n\nconsole.log( getType( 'Uint32Array' ) );\n// returns 'uint32'\n\nconsole.log( getType( 'Float32Array' ) );\n// returns 'float32'\n\nconsole.log( getType( 'Float64Array' ) );\n// returns 'float64'\n\nconsole.log( getType( 'Array' ) );\n// returns 'generic'\n\nconsole.log( getType( 'Object' ) );\n// returns null\n\nconsole.log( getType( 'String' ) );\n// returns null\n\nconsole.log( getType( 'Boolean' ) );\n// returns null\n\nconsole.log( getType( 'Number' ) );\n// returns null\n\nconsole.log( getType( 'null' ) );\n// returns null\n\nconsole.log( getType( [] ) );\n// returns null\n\nconsole.log( getType( null ) );\n// returns null\n\nconsole.log( getType( {} ) );\n// returns null\n```\n\nTo run the example code from the top-level application directory,\n\n``` bash\n$ node ./examples/index.js\n```\n\n\n## Tests\n\n### Unit\n\nUnit tests use the [Mocha][mocha] test framework with [Chai][chai] assertions. To run the tests, execute the following command in the top-level application directory:\n\n``` bash\n$ make test\n```\n\nAll new feature development should have corresponding unit tests to validate correct functionality.\n\n\n### Test Coverage\n\nThis repository uses [Istanbul][istanbul] as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-cov\n```\n\nIstanbul creates a `./reports/coverage` directory. To access an HTML version of the report,\n\n``` bash\n$ make view-cov\n```\n\n\n---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT).\n\n\n## Copyright\n\nCopyright \u0026copy; 2015. The Compute.io Authors.\n\n\n[npm-image]: http://img.shields.io/npm/v/dstructs-array-dtype.svg\n[npm-url]: https://npmjs.org/package/dstructs-array-dtype\n\n[travis-image]: http://img.shields.io/travis/dstructs/array-dtype/master.svg\n[travis-url]: https://travis-ci.org/dstructs/array-dtype\n\n[codecov-image]: https://img.shields.io/codecov/c/github/dstructs/array-dtype/master.svg\n[codecov-url]: https://codecov.io/github/dstructs/array-dtype?branch=master\n\n[dependencies-image]: http://img.shields.io/david/dstructs/array-dtype.svg\n[dependencies-url]: https://david-dm.org/dstructs/array-dtype\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/dstructs/array-dtype.svg\n[dev-dependencies-url]: https://david-dm.org/dev/dstructs/array-dtype\n\n[github-issues-image]: http://img.shields.io/github/issues/dstructs/array-dtype.svg\n[github-issues-url]: https://github.com/dstructs/array-dtype/issues\n\n[mocha]: http://mochajs.org/\n[chai]: http://chaijs.com\n[istanbul]: https://github.com/gotwarlost/istanbul\n[browserify]: https://github.com/substack/node-browserify\n\n[Int8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n[Uint8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n[Uint8ClampedArray]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n[Int16Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n[Uint16Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n[Int32Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n[Uint32Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n[Float32Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n[Float64Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstructs%2Farray-dtype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdstructs%2Farray-dtype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstructs%2Farray-dtype/lists"}