{"id":41249953,"url":"https://github.com/dstructs/cast-arrays","last_synced_at":"2026-01-23T01:36:31.860Z","repository":{"id":32534974,"uuid":"36116748","full_name":"dstructs/cast-arrays","owner":"dstructs","description":"Casts an array to an array of a different data type.","archived":false,"fork":false,"pushed_at":"2015-12-04T21:35:58.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-25T04:30:48.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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-05-23T09:43:34.000Z","updated_at":"2019-08-18T16:45:10.000Z","dependencies_parsed_at":"2022-09-18T00:51:49.175Z","dependency_job_id":null,"html_url":"https://github.com/dstructs/cast-arrays","commit_stats":null,"previous_names":["compute-io/cast-arrays"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dstructs/cast-arrays","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fcast-arrays","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fcast-arrays/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fcast-arrays/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fcast-arrays/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dstructs","download_url":"https://codeload.github.com/dstructs/cast-arrays/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fcast-arrays/sbom","scorecard":{"id":358139,"data":{"date":"2025-08-11","repo":{"name":"github.com/dstructs/cast-arrays","commit":"ac4d90e91535c91ea4e7e8eb3663565af94433ac"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/17 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":"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":"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"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T10:07:28.100Z","repository_id":32534974,"created_at":"2025-08-18T10:07:28.100Z","updated_at":"2025-08-18T10:07:28.100Z"},"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:31.249Z","updated_at":"2026-01-23T01:36:31.855Z","avatar_url":"https://github.com/dstructs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"cast-arrays\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 Casts an array to an array of a different data type.\n\n\n## Installation\n\n``` bash\n$ npm install dstructs-cast-arrays\n```\n\nFor use in the browser, use [browserify][browserify].\n\n\n## Usage\n\n``` javascript\nvar cast = require( 'dstructs-cast-arrays' );\n```\n\n#### cast( x, type )\n\nCasts an input `array` or [`array-like`][array-like] object to a specified `array` type.\n\n``` javascript\nvar arr = Int32Array( 10 );\n\nvar out = cast( arr, 'float32' );\n// returns Float32Array\n```\n\n`type` may be either a `string` specifying the desired output `array` data type or a value from which the desired data type should be inferred.\n\n``` javascript\nvar x = Int32Array( 10 ),\n\ty = Float32Array( 25 );\n\n// Cast `x` to be the same data type as `y`:\nvar out = cast( x, y );\n// returns Float32Array\n```\n\nFor a list of supported output `array` data types, see [dstructs-array-constructors][dstructs-array-constructors].\n\n\n\n## Examples\n\n``` javascript\nvar cast = require( 'dstructs-cast-arrays' ),\n\tarr,\n\tx, y, z;\n\narr = new Int8Array( 10 );\nx = cast( arr, 'int16' );\n// returns Int16Array\n\narr = new Array( 100 );\ny = cast( arr, 'float64' );\n// returns Float64Array\n\nz = cast( x, y );\n// returns Float64Array\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-cast-arrays.svg\n[npm-url]: https://npmjs.org/package/dstructs-cast-arrays\n\n[travis-image]: http://img.shields.io/travis/dstructs/cast-arrays/master.svg\n[travis-url]: https://travis-ci.org/dstructs/cast-arrays\n\n[codecov-image]: https://img.shields.io/codecov/c/github/dstructs/cast-arrays/master.svg\n[codecov-url]: https://codecov.io/github/dstructs/cast-arrays?branch=master\n\n[dependencies-image]: http://img.shields.io/david/dstructs/cast-arrays.svg\n[dependencies-url]: https://david-dm.org/dstructs/cast-arrays\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/dstructs/cast-arrays.svg\n[dev-dependencies-url]: https://david-dm.org/dev/dstructs/cast-arrays\n\n[github-issues-image]: http://img.shields.io/github/issues/dstructs/cast-arrays.svg\n[github-issues-url]: https://github.com/dstructs/cast-arrays/issues\n\n[browserify]: https://github.com/substack/node-browserify\n[mocha]: http://mochajs.org/\n[chai]: http://chaijs.com\n[istanbul]: https://github.com/gotwarlost/istanbul\n\n[array-like]: https://github.com/validate-io/array-like\n[dstructs-array-constructors]: https://github.com/dstructs/array-constructors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstructs%2Fcast-arrays","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdstructs%2Fcast-arrays","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstructs%2Fcast-arrays/lists"}