Skip to content

Commit ec2af7e

Browse files
committed
Documentation polish
1 parent 36b4215 commit ec2af7e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

documentation/index.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Let's imagine we wanted to sort arrays of numbers using this function:
2828

2929
```js
3030
function sort(arr) {
31-
return [].concat(arr).sort();
31+
return [].concat(arr).sort();
3232
}
3333
```
3434

@@ -45,11 +45,11 @@ var g = require('chance-generators')(42);
4545
var arrays = g.n(g.integer({ min: -20, max: 20 }), g.integer({ min: 1, max: 20 }));
4646

4747
expect(function (arr) {
48-
var sorted = sort(arr);
48+
var sorted = sort(arr);
4949

50-
expect(sorted, 'to have length', arr.length)
51-
.and('first item to be less than or equal to all', arr)
52-
.and('last item to be greater than or equal to all', arr);
50+
expect(sorted, 'to have length', arr.length)
51+
.and('first item to be less than or equal to all', arr)
52+
.and('last item to be greater than or equal to all', arr);
5353
}, 'to be valid for all', arrays);
5454
```
5555

@@ -76,19 +76,19 @@ If we wanted to fix the problem, we would need to use a comparison function:
7676

7777
```js
7878
function sort(arr) {
79-
return [].concat(arr).sort(function (a, b) {
80-
return a - b;
81-
});
79+
return [].concat(arr).sort(function (a, b) {
80+
return a - b;
81+
});
8282
}
8383
```
8484

8585
```js
8686
expect(function (arr) {
87-
var sorted = sort(arr);
87+
var sorted = sort(arr);
8888

89-
expect(sorted, 'to have length', arr.length)
90-
.and('first item to be less than or equal to all', arr)
91-
.and('last item to be greater than or equal to all', arr);
89+
expect(sorted, 'to have length', arr.length)
90+
.and('first item to be less than or equal to all', arr)
91+
.and('last item to be greater than or equal to all', arr);
9292
}, 'to be valid for all', arrays);
9393
```
9494

@@ -130,9 +130,9 @@ Include the library with RequireJS the following way:
130130

131131
```js#evaluate:false
132132
define(['unexpected', 'unexpected-check'], funtion (unexpected, unexpectedCheck) {
133-
var expect = unexpected.clone();
134-
expect.use(unexpectedCheck);
135-
// Your code
133+
var expect = unexpected.clone();
134+
expect.use(unexpectedCheck);
135+
// Your code
136136
});
137137
```
138138

0 commit comments

Comments
 (0)