{"id":26605822,"url":"https://github.com/hamxabaig/cols-from-array","last_synced_at":"2025-03-23T21:16:36.460Z","repository":{"id":57203557,"uuid":"181307790","full_name":"hamxabaig/cols-from-array","owner":"hamxabaig","description":"Create columns from an array with no bullshit! :sunglasses:","archived":false,"fork":false,"pushed_at":"2019-04-14T12:49:49.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T19:15:39.714Z","etag":null,"topics":["array-manipulations","columns","nested-arrays"],"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/hamxabaig.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":"2019-04-14T12:46:49.000Z","updated_at":"2019-04-25T05:21:46.000Z","dependencies_parsed_at":"2022-09-16T15:12:21.414Z","dependency_job_id":null,"html_url":"https://github.com/hamxabaig/cols-from-array","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamxabaig%2Fcols-from-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamxabaig%2Fcols-from-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamxabaig%2Fcols-from-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamxabaig%2Fcols-from-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamxabaig","download_url":"https://codeload.github.com/hamxabaig/cols-from-array/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153896,"owners_count":20569408,"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":["array-manipulations","columns","nested-arrays"],"created_at":"2025-03-23T21:16:35.259Z","updated_at":"2025-03-23T21:16:36.272Z","avatar_url":"https://github.com/hamxabaig.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cols-from-array [![Build Status](https://travis-ci.com/hamxabaig/cols-from-array.svg?branch=master)](https://travis-ci.com/hamxabaig/cols-from-array)\n\n\u003e Create cols from an array with no bullshit! :sunglasses:\n\n## Install\n\n```\n$ npm install cols-from-array\n```\n\n\n## Usage\n\n```js\nconst createCols = require('cols-from-array');\n\ncreateCols([1, 2, 3, 4, 5, 6], {colLength: 2});\n//=\u003e [[1, 3, 5], [2, 4, 6]]\n```\n\n\n## API\n\n### createCols(arr, [options])\n\n#### arr\n\nType: `Array`\n\nThe Array to convert into columns\n\n#### options\n\nType: `Object`\n\n##### colLength\n\nType: `number`\u003cbr\u003e\nDefault: `2`\n\nThe number of columns to divide the array into. \n\n##### fillCol\n\nType: `any`\u003cbr\u003e\nDefault: `N/A`\n\nUsed to fill the array cols if the length is uneven. For instance, \n```\ncreateCols([1, 2, 3, 4, 5, 6, 7], {colLength: 3, fillCol: 0});\n//=\u003e [[1, 4, 7], [2, 5, 0], [3, 6, 0]]\n```\n\n## Related\n\n- [rows-from-array](https://github.com/hamxabaig/rows-from-array) - Create rows from array\n\n## License\n\nMIT © Made with ❤️ \u0026 ☕️ by [Hamza Baig](http://hamxabaig.github.io)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamxabaig%2Fcols-from-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamxabaig%2Fcols-from-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamxabaig%2Fcols-from-array/lists"}