Sha256: d81ad47a9b867d25802c9637620368fa9437d12bf0d71960a7eaac308be6a3e1
Contents?: true
Size: 632 Bytes
Versions: 295
Compression:
Stored size: 632 Bytes
Contents
class Bob { private isNullOrWhitespace( input: string ): boolean { if (typeof input === 'undefined' || input === undefined ) { return true } return input.replace(/\s/g, '').length < 1 } hey(inputRaw: string): string { const input = inputRaw.trim() if (this.isNullOrWhitespace(input)) { return "Fine. Be that way!" } if ( !(input.toLowerCase() === input) && (input.toUpperCase() === input)) { return "Whoa, chill out!" } if ( input.endsWith("?")) { return "Sure." } return "Whatever." } } export default Bob
Version data entries
295 entries across 295 versions & 1 rubygems