summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolan McMahon <caolan.mcmahon@gmail.com>2014-04-28 15:35:29 +0100
committerCaolan McMahon <caolan.mcmahon@gmail.com>2014-04-28 15:35:29 +0100
commit64d178ad60bfcaf8df3b4dabc521f05caccb39b3 (patch)
tree8f7eb660af6f2d100afc7eb9575871d1ea9ef6ad
parent931d15412c5081e35f96dee3cc7a98d8322e7b17 (diff)
parentffab0a86e4ec35e8117de541719536b2cd0bf598 (diff)
downloadasync-64d178ad60bfcaf8df3b4dabc521f05caccb39b3.tar.gz
Merge pull request #511 from kevinsawicki/patch-1
Fence code block as js
-rw-r--r--README.md29
1 files changed, 15 insertions, 14 deletions
diff --git a/README.md b/README.md
index a32d437..c57538d 100644
--- a/README.md
+++ b/README.md
@@ -532,20 +532,21 @@ __Sort Order__
By modifying the callback parameter the sorting order can be influenced:
- //ascending order
- async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x);
- }, function(err,result){
- //result callback
- } );
-
- //descending order
- async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x*-1); //<- x*-1 instead of x, turns the order around
- }, function(err,result){
- //result callback
- } );
-
+```js
+//ascending order
+async.sortBy([1,9,3,5], function(x, callback){
+ callback(err, x);
+}, function(err,result){
+ //result callback
+} );
+
+//descending order
+async.sortBy([1,9,3,5], function(x, callback){
+ callback(err, x*-1); //<- x*-1 instead of x, turns the order around
+}, function(err,result){
+ //result callback
+} );
+```
---------------------------------------