isjs
isjs copied to clipboard
Create an opposite function `isnt`
I've been brainstorming on the idea of having an opposite function, i.e. isnt()
. This would simply return a reversed boolean value from the is()
function. The benefits are more readable tests and users can stop banging the is
:
if ( ! is('[email protected]', 'email') ) { ... }
A simple solution would be to add a function at the bottom of each script called isnt
which returns a reversed is
. For example, the jQuery plugin could implement the following:
$.isnt = function () { return !$.is; };
$.fn.isnt = function () { return !$.fn.is; };
More elegant solution would be preferable - Chat away :smile: