{"id":20806720,"url":"https://github.com/fed/jsort","last_synced_at":"2026-04-26T02:32:27.449Z","repository":{"id":57286114,"uuid":"45314261","full_name":"fed/jsort","owner":"fed","description":"Simple array sorting utility supporting multiple data types","archived":false,"fork":false,"pushed_at":"2017-08-10T14:20:56.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-12-26T13:44:55.665Z","etag":null,"topics":["array","sort","sorting"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/jsort","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-31T18:57:41.000Z","updated_at":"2017-12-17T18:24:52.000Z","dependencies_parsed_at":"2022-08-29T12:00:48.828Z","dependency_job_id":null,"html_url":"https://github.com/fed/jsort","commit_stats":null,"previous_names":["fknussel/jsort"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/fed/jsort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fjsort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fjsort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fjsort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fjsort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fed","download_url":"https://codeload.github.com/fed/jsort/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fjsort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32284333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"online","status_checked_at":"2026-04-26T02:00:05.962Z","response_time":129,"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":["array","sort","sorting"],"created_at":"2024-11-17T19:24:53.853Z","updated_at":"2026-04-26T02:32:27.423Z","avatar_url":"https://github.com/fed.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsort [![Build Status](https://travis-ci.org/fknussel/jsort.svg)](https://travis-ci.org/fknussel/jsort)\n\nSimple array sorting utility supporting multiple data types.\n\n## Install\n\n```\nnpm install --save jsort\n```\n\n## Usage\n\n### jsort.`\u003cdataType\u003e(array [, key])`\n\nAvailable data types include: `text`, `numeric`, `currency` and `date`. Default sorting order is `ASC`.\n\n```js\njsort.text(['Argentina', 'Australia', 'New Zealand', 'Ireland', 'Canada']);\njsort.numeric([2.01, 1.3555, 3, 1990]);\njsort.currency(['$1,726', '$3,021,726.00', '$120.75']);\njsort.date(['2015-01-31', '01/30/2015', 'Sat, Jan 3, 2015', 'January 31, 2014']);\n```\n\nWhen a key gets passed in, jsort assumes the collection contains objects and will try to sort them by the key provided:\n\n```js\njsort.numeric([{name: 'Homer', age: 40}, {name: 'Marge', age: 35}], 'age');\n```\n\n### jsort.`\u003cdataType\u003e(array [, key]).reverse()`\n\nReverse sort any array (`DESC`) by using the `.reverse()` method:\n\n```js\njsort.text(['I', 'am', 'Yoda']).reverse(); // returns ['Yoda', 'I', 'am']\n```\n\n## Run Test Suite\n\n```\nnpm test\n```\n\n## Release Versions\n\n1. `git fetch`\n2. `git checkout develop \u0026\u0026 git reset --hard origin/develop`\n3. `npm version [\u003cnewversion\u003e | major | minor | patch]`\n4. `git checkout master \u0026\u0026 git reset --hard origin/master`\n5. `git merge develop`\n6. `git push --tags \u0026\u0026 git push \u0026\u0026 git checkout develop \u0026\u0026 git push`\n\nPublish the package to [npm's public registry](https://www.npmjs.com/):\n\n```\nnpm publish\n```\n\nTo make sure everything worked just fine, go to [http://npmjs.com/package/jsort](http://npmjs.com/package/jsort).\n\n**Heads up!** To publish, you must have a user on the npm registry. If you don't have one, create it with `npm adduser`. If you created one on the site, use `npm login` to store the credentials on the client. You can use `npm config ls` to ensure that the credentials are stored on your client. Check that it has been added to the registry by going to [http://npmjs.com/~](http://npmjs.com/~).\n\n## Semantic Versioning\n\nGiven a version number `MAJOR.MINOR.PATCH`, increment the:\n\n1. `MAJOR` version when you make incompatible API changes,\n2. `MINOR` version when you add functionality in a backwards-compatible manner, and\n3. `PATCH` version when you make backwards-compatible bug fixes.\n\nAdditional labels for pre-release and build metadata [are available](https://docs.npmjs.com/cli/version) as extensions to the `MAJOR.MINOR.PATCH` format.\n\nSee the [Semantic Versioning](http://semver.org/) specification for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed%2Fjsort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffed%2Fjsort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed%2Fjsort/lists"}