Skip to content

Commit e03a286

Browse files
flekschasd4rkr00t
authored andcommitted
fix: Fixed typos
No actual code changes!
1 parent 9698572 commit e03a286

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@
66
* @return {String}
77
*/
88
function lessThanZeroError(p) {
9-
return 'Percentile expect number >= 0 but given "' + p + '" and its type is "' + (typeof p) + '".';
9+
return 'Expect percentile to be >= 0 but given "' + p + '" and its type is "' + (typeof p) + '".';
1010
}
1111

1212
/**
13-
* Error message for case when percentile is grater than 100
13+
* Error message for case when percentile is greater than 100
1414
*
1515
* @param {Number} p
1616
*
1717
* @return {String}
1818
*/
19-
function graterThanHundredError(p) {
20-
return 'Percentile expect number <= 100 but given "' + p + '" and its type is "' + (typeof p) + '".';
19+
function greaterThanHundredError(p) {
20+
return 'Expect percentile to be <= 100 but given "' + p + '" and its type is "' + (typeof p) + '".';
2121
}
2222

2323
/**
24-
* Error message for case when percentile is NaN
24+
* Error message for case when percentile is not a number (NaN)
2525
*
2626
* @param {Number} p
2727
*
2828
* @return {String}
2929
*/
3030
function nanError(p) {
31-
return 'Percentile expect number but given "' + p + '" and its type is "' + (typeof p) + '".';
31+
return 'Expect percentile to be a number but given "' + p + '" and its type is "' + (typeof p) + '".';
3232
}
3333

3434
/**
@@ -52,7 +52,7 @@ function percentile(p, list, fn) {
5252
}
5353

5454
if (p > 100) {
55-
throw new Error(graterThanHundredError(p));
55+
throw new Error(greaterThanHundredError(p));
5656
}
5757

5858
list = list.slice().sort(function (a, b) {

0 commit comments

Comments
 (0)