Travis build: 2020

This commit is contained in:
30secondsofcode
2018-05-02 17:21:29 +00:00
parent fab2a9e822
commit 709b3a31b7
17 changed files with 76 additions and 40 deletions

View File

@ -13,7 +13,9 @@ const factorial = n =>
? (() => {
throw new TypeError('Negative numbers are not allowed!');
})()
: n <= 1 ? 1 : n * factorial(n - 1);
: n <= 1
? 1
: n * factorial(n - 1);
```
```js

View File

@ -8,7 +8,11 @@ Use the modulo operator (`%`) and conditional checks to transform an integer to
const getMeridiemSuffixOfInteger = num =>
num === 0 || num === 24
? 12 + 'am'
: num === 12 ? 12 + 'pm' : num < 12 ? num % 12 + 'am' : num % 12 + 'pm';
: num === 12
? 12 + 'pm'
: num < 12
? num % 12 + 'am'
: num % 12 + 'pm';
```
```js

View File

@ -12,7 +12,9 @@ const join = (arr, separator = ',', end = separator) =>
(acc, val, i) =>
i === arr.length - 2
? acc + val + end
: i === arr.length - 1 ? acc + val : acc + val + separator,
: i === arr.length - 1
? acc + val
: acc + val + separator,
''
);
```

View File

@ -15,7 +15,9 @@ const size = val =>
? val.length
: val && typeof val === 'object'
? val.size || val.length || Object.keys(val).length
: typeof val === 'string' ? new Blob([val]).size : 0;
: typeof val === 'string'
? new Blob([val]).size
: 0;
```
```js