string-natural-compare
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "string-natural-compare", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Compare alphanumeric strings the same way a human would, using a natural order algorithm", | ||
@@ -23,9 +23,9 @@ "author": "Nathan Woltman <nwoltman@outlook.com>", | ||
"grunt": "~1.0.1", | ||
"grunt-eslint": "^18.0.0", | ||
"grunt-eslint": "^19.0.0", | ||
"grunt-mocha-istanbul": "^5.0.1", | ||
"grunt-mocha-test": "^0.12.7", | ||
"grunt-mocha-test": "^0.13.2", | ||
"istanbul": "^0.4.3", | ||
"jit-grunt": "^0.10.0", | ||
"mocha": "^2.3.2", | ||
"should": "^9.0.0" | ||
"mocha": "^3.1.2", | ||
"should": "^11.1.1" | ||
}, | ||
@@ -32,0 +32,0 @@ "scripts": { |
@@ -8,10 +8,4 @@ # String Natural Compare | ||
[![Coverage Status](https://coveralls.io/repos/nwoltman/string-natural-compare/badge.svg?branch=master)](https://coveralls.io/r/nwoltman/string-natural-compare?branch=master) | ||
[![devDependency Status](https://david-dm.org/nwoltman/string-natural-compare/dev-status.svg)](https://david-dm.org/nwoltman/string-natural-compare#info=devDependencies) | ||
[![devDependencies Status](https://david-dm.org/nwoltman/string-natural-compare/dev-status.svg)](https://david-dm.org/nwoltman/string-natural-compare?type=dev) | ||
--- | ||
**Important:** The API has changed between v1 and v2. If upgrading, check out the [migration guide](#migration-guide). If using the Bower module (or v1 npm module), see the [v1 API](https://github.com/nwoltman/string-natural-compare/tree/v1.1.1#installation). | ||
--- | ||
``` | ||
@@ -40,4 +34,2 @@ Standard sorting: Natural order sorting: | ||
#### npm: | ||
```sh | ||
@@ -47,17 +39,3 @@ npm install string-natural-compare --save | ||
#### Bower (only up to v1.1.1): | ||
```sh | ||
bower install string-natural-compare#1.1.1 | ||
``` | ||
Include the script in your HTML (drop the ".min" to use the development version): | ||
```html | ||
<script src="/bower_components/string-natural-compare/natural-compare.min.js"></script> | ||
``` | ||
**Note:** IE8 and lower not supported. | ||
## Usage | ||
@@ -142,18 +120,1 @@ | ||
**Note:** Putting numbers in the custom alphabet can cause undefined behaviour. | ||
## Migration Guide | ||
### Upgrading from v1 to v2 | ||
The module must now be required like so: | ||
```js | ||
var naturalCompare = require('string-natural-compare'); | ||
``` | ||
Then the following replacements need to be made: | ||
+ `String.naturalCompare` → `naturalCompare` | ||
+ `String.naturalCaseCompare` → `naturalCompare.caseInsensitive` (or the alias `naturalCompare.i`) | ||
+ `String.alphabet` → `naturalCompare.alphabet` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9033
117