Travis build: 1311

This commit is contained in:
30secondsofcode
2019-07-20 09:39:17 +00:00
parent 63783ad82a
commit d41b86fa31
5 changed files with 8 additions and 5 deletions

View File

@ -4507,11 +4507,11 @@ isSameDate(new Date(2010, 10, 20), new Date(2010, 10, 20)); // true
Results in a boolean representation of a specific date.
Pass the specific date object firstly.
Use `Date.getDay()` to check weekday then return a boolean.
Use `Date.getDay()` to check weekday by using a modulo operator and then returning a boolean.
```js
const isWeekday = (t = new Date()) => {
return t.getDay() >= 1 && t.getDay() <= 5;
return t.getDay() % 6 !== 0;
};
```
@ -4816,6 +4816,7 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
const lengthIs4 = checkProp(l => l === 4, 'length');
lengthIs4([]); // false
lengthIs4([1,2,3,4]); // true