{"id":15650008,"url":"https://github.com/doowb/sort-object","last_synced_at":"2025-10-23T23:17:24.757Z","repository":{"id":10994820,"uuid":"13316381","full_name":"doowb/sort-object","owner":"doowb","description":"Sort the keys in an object.","archived":false,"fork":false,"pushed_at":"2019-09-19T04:17:01.000Z","size":49,"stargazers_count":37,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-18T01:15:16.253Z","etag":null,"topics":[],"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/doowb.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":"2013-10-04T04:29:21.000Z","updated_at":"2022-06-15T11:56:33.000Z","dependencies_parsed_at":"2022-09-02T00:23:41.220Z","dependency_job_id":null,"html_url":"https://github.com/doowb/sort-object","commit_stats":null,"previous_names":["helpers/sort-object"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/doowb/sort-object","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fsort-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fsort-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fsort-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fsort-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/sort-object/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fsort-object/sbom","scorecard":{"id":352422,"data":{"date":"2025-08-11","repo":{"name":"github.com/doowb/sort-object","commit":"f112c09f57ed4a56353b00bbb0b13bac26f97b9d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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 2/26 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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 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-18T08:40:31.926Z","repository_id":10994820,"created_at":"2025-08-18T08:40:31.926Z","updated_at":"2025-08-18T08:40:31.926Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280707115,"owners_count":26377056,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-10-03T12:32:58.988Z","updated_at":"2025-10-23T23:17:24.725Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","readme":"# sort-object [![NPM version](https://img.shields.io/npm/v/sort-object.svg)](https://www.npmjs.com/package/sort-object) [![Build Status](https://img.shields.io/travis/doowb/sort-object.svg)](https://travis-ci.org/doowb/sort-object)\n\n\u003e Sort the keys in an object.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm i sort-object --save\n```\n\n## Usage\n\n```js\nvar sortObj = require('sort-object');\n```\n\nBy default, the keys on an object will be sorted in ascending order:\n\n```js\nsortObj({a: 1, c: 2, b: 3});\n//=\u003e {a: 1, b: 3, c: 2}\n```\n\nThe second param can be an object of `options` OR an array of `keys`:\n\n**object**\n\n```js\nsortObj({a: 1, c: 2, b: 3}, {keys: ['a', 'b']});\n//=\u003e {a: 1, b: 3}\n```\n\n**array**\n\n```js\nsortObj({a: 1, c: 2, b: 3}, ['a', 'c']);\n//=\u003e {a: 1, c: 2}\n```\n\n## Options\n\n* `keys` {Array} The returned object will contain only the specified keys, in the same order.\n* `sort` {Function} Sort function to sort the keys using JavaScript's `.sort()` method.\n* `sortOrder` {String} Valid values are `desc` or `asc`, case insensitive.\n* `sortBy` {String} Sort function that is passed the entire object, rather than just the keys - as with the `.sort()` method.\n\n### options.keys\n\nCreate a new object with only the given keys.\n\n```js\nvar o = {a: 1, c: 2, e: 5, d: 4, b: 3};\nsortObj(o, {keys: ['a', 'b']});\n\n//=\u003e {a: 1, b: 3}\n```\n\n### options.sort\n\nFunction to be passed to javascript's `.sort()` method:\n\n```js\nvar o = {a: 1, c: 2, e: 5, d: 4, b: 3};\nvar obj = sortObj(o, {\n  sort: function (a, b) {\n    return a \u003c b ? -1 : 1;\n  }\n});\nobj;\n//=\u003e {a: 1, b: 3, c: 2, d: 4, e: 5}\n```\n\n### options.sortOrder\n\nValid values are `desc` or `asc`, case insensitive:\n\n```js\nvar o = {a: 1, c: 2, e: 5, d: 4, b: 3};\nsortObj(o, {sortOrder: 'ASC'});\n//=\u003e {e: 5, d: 4, c: 3, b: 2, a: 1}\n```\n\n### options.sortBy\n\nFunction that returns an array of keys to sort by:\n\n```js\nvar old = {one: 'aa', two: 'bc', three: 'ab'};\nvar o = sortObj(old, {\n  sortBy: function (obj) {\n    var arr = [];\n    Object.keys(obj).filter(function(key) {\n      if (/^a/.test(obj[key])) arr.push(key);\n    });\n    return arr.reverse();\n  }\n});\n//=\u003e {three: 'ab', one: 'aa'}\n```\n\n## Author\n**Brian Woodward**\n\n+ [github/doowb](https://github.com/doowb)\n+ [twitter/doowb](http://twitter.com/doowb)\n\n## License\nCopyright © 2014-2016 [Brian Woodward](https://github.com/doowb)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb) on February 03, 2016._\n","funding_links":[],"categories":["Object"],"sub_categories":["React Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fsort-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fsort-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fsort-object/lists"}