{"id":16461914,"url":"https://github.com/xico2k/multi-sort","last_synced_at":"2025-10-27T10:30:59.966Z","repository":{"id":46985897,"uuid":"105527469","full_name":"xiCO2k/multi-sort","owner":"xiCO2k","description":"This package allows you to sort a multi dimensional array easily.","archived":false,"fork":false,"pushed_at":"2023-01-05T22:07:47.000Z","size":1127,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T00:51:36.242Z","etag":null,"topics":["array","javascript","multidimensional","objects","sort"],"latest_commit_sha":null,"homepage":"","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/xiCO2k.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":"2017-10-02T11:35:48.000Z","updated_at":"2022-01-26T08:07:37.000Z","dependencies_parsed_at":"2023-02-04T19:31:10.547Z","dependency_job_id":null,"html_url":"https://github.com/xiCO2k/multi-sort","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiCO2k%2Fmulti-sort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiCO2k%2Fmulti-sort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiCO2k%2Fmulti-sort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiCO2k%2Fmulti-sort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiCO2k","download_url":"https://codeload.github.com/xiCO2k/multi-sort/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238480633,"owners_count":19479525,"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","javascript","multidimensional","objects","sort"],"created_at":"2024-10-11T11:09:50.926Z","updated_at":"2025-10-27T10:30:59.586Z","avatar_url":"https://github.com/xiCO2k.png","language":"TypeScript","readme":"\u003ch1 align=\"center\" style=\"border:none !important\"\u003e\n    MultiSort\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/xiCO2k/multi-sort/actions\"\u003e\u003cimg alt=\"GitHub Workflow Status (master)\" src=\"https://img.shields.io/github/workflow/status/xiCO2k/multi-sort/Tests/master\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/multi-sort\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://img.shields.io/npm/dt/multi-sort.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/multi-sort\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/npm/l/multi-sort.svg?sanitize=true\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    This package allows you to sort a multi dimensional array easily.\n\u003c/p\u003e\n\n## Installation\nWith [npm](https://www.npmjs.com):\n```sh\n$ npm i multi-sort\n```\nor with [yarn](https://yarnpkg.com):\n```sh\n$ yarn add multi-sort\n```\n\n## Usage\n\nThere are multiple ways to use this package, check the example bellow:\n\n```js\nimport MultiSort from 'multi-sort';\n\nconst arr = [\n    { first_name: 'John', last_name: 'Doe' },\n    { first_name: 'Anthony', last_name: 'Zipher' },\n    { first_name: 'Anthony', last_name: 'Carlos' },\n];\n```\n\nWith arguments providing the object `key` and the `direction`:\n\n```js\nconst sortedByFirstName = MultiSort(arr, 'first_name', 'ASC');\n```\n\nWith arguments providing an array of object `keys` and `directions`:\n\n```js\nconst sortedByFirstAndLast = MultiSort(\n    arr,\n    ['first_name', 'last_name'],\n    ['ASC', 'DESC']\n);\n```\n\nOr, With an Object where the `key` represents the object `key` on the array provided and the `value` represents\nthe `direction`:\n\n```js\nconst sortedByFirstAndLast = MultiSort(arr, {\n    first_name: 'ASC',\n    last_name: 'DESC',\n});\n```\n\nMultiSort is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxico2k%2Fmulti-sort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxico2k%2Fmulti-sort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxico2k%2Fmulti-sort/lists"}