Created
November 27, 2011 22:59
-
-
Save user24/1398373 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hasMultipleArgs = args.length > 1; | |
var argIsString = typeof arg == 'string'; | |
var argIsSentence = ~arg.indexOf(' '); | |
var argIsFormattingOption = ~arg.indexOf('%'); | |
if (hasMultipleArgs && argIsString && !argIsSentence && !argIsFormattingOption) { /*...*/ } | |
// see https://github.com/observing/devnull/blob/master/lib/logger.js#L364-367 for alternative style |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment