{"id":18763594,"url":"https://github.com/iguntur/obj-sort","last_synced_at":"2025-12-06T03:30:11.560Z","repository":{"id":65467339,"uuid":"78862376","full_name":"iguntur/obj-sort","owner":"iguntur","description":"Order object by ascending or descending","archived":false,"fork":false,"pushed_at":"2017-01-13T15:58:03.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-23T22:39:43.903Z","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/iguntur.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-01-13T15:41:08.000Z","updated_at":"2017-02-12T03:59:56.000Z","dependencies_parsed_at":"2023-01-25T08:45:52.858Z","dependency_job_id":null,"html_url":"https://github.com/iguntur/obj-sort","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Fobj-sort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Fobj-sort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Fobj-sort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Fobj-sort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iguntur","download_url":"https://codeload.github.com/iguntur/obj-sort/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239661824,"owners_count":19676411,"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":[],"created_at":"2024-11-07T18:26:44.356Z","updated_at":"2025-12-06T03:30:11.251Z","avatar_url":"https://github.com/iguntur.png","language":"JavaScript","readme":"# obj-sort [![Build Status](https://travis-ci.org/iguntur/obj-sort.svg?branch=master)](https://travis-ci.org/iguntur/obj-sort)\n\n\u003e Order object by ascending or descending\n\n\n## Install\n\n```\n$ npm install --save obj-sort\n```\n\n\n## Usage\n\n```js\nconst objSort = require('obj-sort');\n\n// ascending by default\nobjSort({\n    b: 'b',\n    c: ['y', 'x'],\n    a: {y: 'x', x: 'y', n: {foo: 'foo', bar: 'bar'}}\n});\n/*\n{\n    a: {n: {bar: 'bar', foo: 'foo'}, x: 'y', y: 'x'},\n    b: 'b',\n    c: ['y', 'x']\n}\n*/\n\n// descending\nobjSort({\n    a: {n: {bar: 'bar', foo: 'foo'}, x: 'y'},\n    c: ['y', 'x'],\n    b: 'b'\n}, 'desc');\n/*\n{\n    c: ['y', 'x'],\n    b: 'b',\n    a: {x: 'y', n: {foo: 'foo', bar: 'bar'}}\n}\n*/\n```\n\n\n## API\n\n### objSort(obj, order)\n\nReturns an object\n\n#### obj\n\nType: `object`\n\n#### order\n\nType: `string` \u003cbr\u003e\nOptions: `asc`, `desc` \u003cbr\u003e\nDefault: `asc`\n\nSet order type object\n\n\n## License\n\nMIT © [Guntur Poetra](http://iguntur.starmediateknik.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figuntur%2Fobj-sort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figuntur%2Fobj-sort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figuntur%2Fobj-sort/lists"}