natural-compare
npmv1.4.0Compare strings containing a mix of letters and numbers in the way a human being would in sort order.
Overview
natural-compare is an npm package that compare strings containing a mix of letters and numbers in the way a human being would in sort order. The latest version is 1.4.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need compare strings containing a mix of letters and numbers in the way a human being would in sort order and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (2 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of natural-compare.
Dependencies
Dev (2)
Used by
Popular packages that depend on natural-compare.
Alternatives to natural-compare
Modify strings, generate sourcemaps
Functions for dealing with a PostgreSQL connection string
Get the line and column number of a specific character in a string
Escape RegExp special characters
Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet
node's assert.deepEqual algorithm
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
node's assert.deepEqual algorithm except for NaN being equal to NaN
Efficient implementation of Levenshtein algorithm with locale-specific collator support.
deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies
Returns true if a string has an extglob.
Frequently installed together
Runtime typescript and ESM support for Node.js
The semantic version parser used by npm.
Lightweight debugging utility for Node.js and the browser
Modify strings, generate sourcemaps
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
An incremental implementation of MurmurHash3
utility box for ECMAScript language tools
A query library for ECMAScript AST using a CSS selector like query language.
An Esprima-compatible JavaScript parser built on Acorn
ECMAScript scope analyzer for ESLint
Version history
| Version | Published | License |
|---|---|---|
| 1.4.0latest | 10 years ago | MIT |
| 1.2.2 | 11 years ago | MIT |
Maintainers
Frequently asked questions
How do I install natural-compare?
Run `npm install natural-compare` to add natural-compare to your npm project.
What license is natural-compare released under?
natural-compare is distributed under the MIT license.
How popular is natural-compare?
natural-compare has approximately 0 downloads per week and 1 known dependent packages.