Skip to content

Commit 71627df

Browse files
committed
use includes instead of indexOf
1 parent dac2945 commit 71627df

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/doc/abstract/AbstractDoc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,7 @@ const s_GET_DYNAMIC_INVOKE_METHODS = (obj) =>
816816
{
817817
Object.getOwnPropertyNames(obj).forEach((prop) =>
818818
{
819-
if (props.indexOf(prop) === -1 && target[prop] instanceof Function && prop.startsWith('_$'))
820-
{
821-
props.push(prop);
822-
}
819+
if (!props.includes(prop) && target[prop] instanceof Function && prop.startsWith('_$')) { props.push(prop); }
823820
});
824821

825822
obj = Object.getPrototypeOf(obj);

src/parser/AbstractParamParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export default class AbstractParamParser
172172
result.types = [typeText];
173173
}
174174

175-
result.spread = typeText.indexOf('...') === 0;
175+
result.spread = typeText.startsWith('...');
176176
}
177177
else
178178
{

0 commit comments

Comments
 (0)