{"id":41249938,"url":"https://github.com/dstructs/to-array","last_synced_at":"2026-01-23T01:36:29.158Z","repository":{"id":32997770,"uuid":"36628030","full_name":"dstructs/to-array","owner":"dstructs","description":"Construct an array of arrays from a Matrix.","archived":false,"fork":false,"pushed_at":"2015-11-27T23:19:58.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-22T04:53:39.898Z","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-06-01T00:08:44.000Z","updated_at":"2019-08-18T16:45:40.000Z","dependencies_parsed_at":"2022-09-18T00:50:47.648Z","dependency_job_id":null,"html_url":"https://github.com/dstructs/to-array","commit_stats":null,"previous_names":["compute-io/to-array"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dstructs/to-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fto-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fto-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fto-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fto-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dstructs","download_url":"https://codeload.github.com/dstructs/to-array/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstructs%2Fto-array/sbom","scorecard":{"id":358144,"data":{"date":"2025-08-11","repo":{"name":"github.com/dstructs/to-array","commit":"7c3cdebdc1b1536d99b9bd89a0a0111e3c8f1139"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/15 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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-18T10:07:32.134Z","repository_id":32997770,"created_at":"2025-08-18T10:07:32.134Z","updated_at":"2025-08-18T10:07:32.134Z"},"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:28.521Z","updated_at":"2026-01-23T01:36:29.152Z","avatar_url":"https://github.com/dstructs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"to-array\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 Construct an array of arrays from a [Matrix][matrix].\n\n\n## Installation\n\n``` bash\n$ npm install dstructs-to-array\n```\n\nFor use in the browser, use [browserify](https://github.com/substack/node-browserify).\n\n\n## Usage\n\n``` javascript\nvar toArray = require( 'dstructs-to-array' );\n```\n\n#### toArray( x )\n\nConstructs an `array` of `arrays`. To convert a [matrix][matrix],\n\n``` javascript\nvar mat = matrix( [ 2, 2 ] );\n\nvar arr = toArray( mat )\n// returns [ [ 0, 0 ], [ 0, 0 ] ]\n```\n\nIf provided an empty [matrix][matrix], the function returns an empty `array`.\n\n``` javascript\nvar mat, arr;\n\nmat = matrix( [0,0] );\narr = toArray( mat );\n// returns []\n\nmat = matrix( [0,10] );\narr = toArray( mat );\n// returns []\n\nmat = matrix( [10,0] );\narr = toArray( mat );\n// returns []\n```\n\n\n## Examples\n\n``` javascript\nvar toArray = require( 'dstructs-to-array' ),\n\tmatrix = require( 'dstructs-matrix' );\n\nvar data, mat;\n\ndata = new Int32Array( [ 1, 2, 3, 4 ] );\nmat = matrix( data, [ 2, 2 ] );\n\nconsole.log( toArray( mat ) );\n// returns [ [ 1, 2 ], [ 3, 4 ] ]\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](https://github.com/compute-io) Authors.\n\n\n[npm-image]: http://img.shields.io/npm/v/dstructs-to-array.svg\n[npm-url]: https://npmjs.org/package/dstructs-to-array\n\n[travis-image]: http://img.shields.io/travis/dstructs/to-array/master.svg\n[travis-url]: https://travis-ci.org/dstructs/to-array\n\n[codecov-image]: https://img.shields.io/codecov/c/github/dstructs/to-array/master.svg\n[codecov-url]: https://codecov.io/github/dstructs/to-array?branch=master\n\n[dependencies-image]: http://img.shields.io/david/dstructs/to-array.svg\n[dependencies-url]: https://david-dm.org/dstructs/to-array\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/dstructs/to-array.svg\n[dev-dependencies-url]: https://david-dm.org/dev/dstructs/to-array\n\n[github-issues-image]: http://img.shields.io/github/issues/dstructs/to-array.svg\n[github-issues-url]: https://github.com/dstructs/to-array/issues\n\n[mocha]: http://mochajs.org/\n[chai]: http://chaijs.com\n[istanbul]: https://github.com/gotwarlost/istanbul\n\n[matrix]: https://github.com/dstructs/matrix\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstructs%2Fto-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdstructs%2Fto-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstructs%2Fto-array/lists"}