Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Use of .test instead of double negation
Browse files Browse the repository at this point in the history
Remove the double negation with the .test function from the RegExp Object. 

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test
  • Loading branch information
MtSaEt authored and andrewagain committed Feb 23, 2018
1 parent f7f7403 commit 3b13dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logic/isNumber.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function isNumber(item) {
return !!item.match(/[0-9]+/);
return /[0-9]+/.test(item);
}

0 comments on commit 3b13dca

Please sign in to comment.