{"id":26126191,"url":"https://github.com/discoveryjs/natural-compare","last_synced_at":"2025-07-21T08:34:17.701Z","repository":{"id":57681966,"uuid":"469824265","full_name":"discoveryjs/natural-compare","owner":"discoveryjs","description":"Compare strings in a natural order","archived":false,"fork":false,"pushed_at":"2022-09-16T22:11:30.000Z","size":158,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-10T09:06:49.726Z","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/discoveryjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-03-14T16:50:56.000Z","updated_at":"2024-05-14T01:59:23.000Z","dependencies_parsed_at":"2022-09-10T15:01:18.323Z","dependency_job_id":null,"html_url":"https://github.com/discoveryjs/natural-compare","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/discoveryjs/natural-compare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discoveryjs%2Fnatural-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discoveryjs%2Fnatural-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discoveryjs%2Fnatural-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discoveryjs%2Fnatural-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discoveryjs","download_url":"https://codeload.github.com/discoveryjs/natural-compare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discoveryjs%2Fnatural-compare/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265876141,"owners_count":23842885,"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":"2025-03-10T17:28:01.457Z","updated_at":"2025-07-21T08:34:17.681Z","avatar_url":"https://github.com/discoveryjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://img.shields.io/npm/v/@discoveryjs/natural-compare.svg)](https://www.npmjs.com/package/@discoveryjs/natural-compare)\n[![Build Status](https://github.com/discoveryjs/natural-compare/actions/workflows/build.yml/badge.svg)](https://github.com/discoveryjs/natural-compare/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/discoveryjs/natural-compare/badge.svg?branch=main)](https://coveralls.io/github/discoveryjs/natural-compare?branch=main)\n[![Minified size](https://badgen.net/bundlephobia/min/@discoveryjs/natural-compare)](https://bundlephobia.com/result?p=@discoveryjs/natural-compare)\n[![Minified + gzip size](https://badgen.net/bundlephobia/minzip/@discoveryjs/natural-compare)](https://bundlephobia.com/result?p=@discoveryjs/natural-compare)\n\n# @discoveryjs/natural-compare\n\nCompare strings in a natural order\n\n## Install\n\n```\nnpm install @discoveryjs/natural-compare\n```\n\n## Usage\n\n```js\nimport { naturalCompare } from '@discoveryjs/natural-compare';\n\n[\n    'file10.js',\n    'file1.js',\n    'file2.js',\n    'file12.js',\n    'file9.js'\n].sort(naturalCompare);\n// file1.js\n// file2.js\n// file9.js\n// file10.js\n// file12.js\n\n// standart sorting\n[\n    'file10.js',\n    'file1.js',\n    'file2.js',\n    'file12.js',\n    'file9.js'\n].sort();\n// file1.js\n// file10.js\n// file12.js\n// file2.js\n// file9.js\n```\n\nIn browser:\n\n```html\n    \u003c!-- ESM --\u003e\n    \u003cscript type=\"module\"\u003e\n        import { natualCompare } from \"@discoveryjs/natural-compare/dist/natural-compare.esm.js\";\n\n        array.sort(naturalCompare);\n    \u003c/script\u003e\n\n    \u003c!-- Old way --\u003e\n    \u003cscript src=\"@discoveryjs/natural-compare/dist/natural-compare.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        array.sort(naturalCompare);\n    \u003c/script\u003e\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscoveryjs%2Fnatural-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscoveryjs%2Fnatural-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscoveryjs%2Fnatural-compare/lists"}