Travis build: 1313

This commit is contained in:
30secondsofcode
2019-07-20 09:46:25 +00:00
parent a4b831fe82
commit ce08cc1234
5 changed files with 8 additions and 5 deletions

View File

@@ -4531,11 +4531,11 @@ isWeekday(); // true (if current date is 2019-07-19)
Results in a boolean representation of a specific date.
Pass the specific date object firstly.
Use `Date.getDay()` to check weekend then return a boolean.
Use `Date.getDay()` to check weekend based on the day being returned as 0 - 6 using a modulo operation then return a boolean.
```js
const isWeekend = (t = new Date()) => {
return t.getDay() === 0 || t.getDay() === 6;
return t.getDay() % 6 === 0;
};
```
@@ -4817,6 +4817,7 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
const lengthIs4 = checkProp(l => l === 4, 'length');
lengthIs4([]); // false
lengthIs4([1,2,3,4]); // true