chore(cloudcmd) lint: convert indexOf to includes

This commit is contained in:
coderaiser 2020-06-01 19:44:41 +03:00
parent 73dc17318e
commit c30bc69f5d
3 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
const currify = require('currify');
const not = currify((array, value) => !~array.indexOf(value));
const not = currify((array, value) => !array.includes(value));
const notOneOf = currify((a, b) => a.filter(not(b)));
module.exports = (currentName, names, removedNames) => {

View file

@ -7,7 +7,7 @@ module.exports = (value) => {
if (value.length === 1)
return '';
if (value && !~value.indexOf('/'))
if (value && !value.includes('/'))
return '/' + value;
return value;

View file

@ -47,7 +47,7 @@ module.exports.columns = (type) => {
.map(addQuotes)
.join(', ');
if (!~all.indexOf(type))
if (!all.includes(type))
exit(`cloudcmd --columns: can be only one of: ${names}`);
};