Skip to content

Commit

Permalink
Use Array.some() rather than Array.find()
Browse files Browse the repository at this point in the history
  • Loading branch information
mward-sudo committed Mar 15, 2022
1 parent 9a2ce1e commit 3b19d1e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -10,8 +10,8 @@ module.exports = {
create: function (context) {
return {
VariableDeclaration(node) {
// Checks node.declarations array for variable with id.name of 'module'
const moduleVariableFound = node.declarations.find(
// Checks larations array for variable with id.name of 'module'
const moduleVariableFound = node.declarations.some(
(declaration) => declaration.id.name === 'module'
)

Expand Down

0 comments on commit 3b19d1e

Please sign in to comment.