mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) lint: convert indexOf to includes
This commit is contained in:
parent
73dc17318e
commit
c30bc69f5d
3 changed files with 3 additions and 3 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ module.exports = (value) => {
|
|||
if (value.length === 1)
|
||||
return '';
|
||||
|
||||
if (value && !~value.indexOf('/'))
|
||||
if (value && !value.includes('/'))
|
||||
return '/' + value;
|
||||
|
||||
return value;
|
||||
|
|
|
|||
|
|
@ -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}`);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue