Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sort-desc

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sort-desc - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

LICENSE

4

index.js
/*!
* sort-desc <https://github.com/helpers/sort-desc>
*
* Copyright (c) 2014 Jon Schlinkert, contributors.
* Copyright (c) 2014-2015 Jon Schlinkert.
* Licensed under the MIT License

@@ -11,3 +11,3 @@ */

module.exports = function (a, b) {
return a < b ? -1 : 1;
return a === b ? 0 : b.localeCompare(a);
};
{
"name": "sort-desc",
"description": "Sort array elements in descending order.",
"version": "0.1.1",
"version": "0.2.0",
"homepage": "https://github.com/jonschlinkert/sort-desc",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/sort-desc.git"
},
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/sort-desc",
"bugs": {
"url": "https://github.com/jonschlinkert/sort-desc/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/jonschlinkert/sort-desc/blob/master/LICENSE-MIT"
}
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "*"
},
"keywords": [
"array",
"arr",
"desc",
"descend",
"descending",
"function",
"keys",
"key",
"element",
"elements",
"order",
"ordered",
"obj",
"object",
"sort"
"sort",
"sorted",
"sorting"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha -R spec"
},
"devDependencies": {
"mocha": "*",
"verb": "^0.2.15"
"verb": {
"related": {
"list": ["sort-asc", "sort-desc", "sort-object"]
}
}
}
}

@@ -1,2 +0,2 @@

# sort-desc [![NPM version](https://badge.fury.io/js/sort-desc.png)](http://badge.fury.io/js/sort-desc)
# sort-desc [![NPM version](https://badge.fury.io/js/sort-desc.svg)](http://badge.fury.io/js/sort-desc) [![Build Status](https://travis-ci.org/jonschlinkert/sort-desc.svg)](https://travis-ci.org/jonschlinkert/sort-desc)

@@ -6,6 +6,7 @@ > Sort array elements in descending order.

## Install
#### Install with [npm](npmjs.org)
```bash
npm i sort-desc --save
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i sort-desc --save
```

@@ -16,20 +17,38 @@

```js
var sortDesc = require('sort-desc');
console.log((['d', 'c', 'b', 'a']).sort(sortDesc));
//=> ['a', 'b', 'c', 'd']
var descending = require('sort-desc');
['a', 'b', 'c', 'd'].sort(descending);
//=> ['d', 'c', 'b', 'a']
```
## Related projects
* [sort-asc](https://github.com/jonschlinkert/sort-asc): Sort array elements in ascending order.
* [sort-object](https://github.com/doowb/sort-object): Sort the keys in an object.
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/sort-desc/issues/new)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 15, 2014._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 17, 2015._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc