1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-10-05 15:05:13 +01:00

Scrub string.js.

Will probably be retired in favor of Node reusables.
This commit is contained in:
hacksalot 2015-12-29 10:26:30 -05:00
parent 483207e5a0
commit b803eba934

View File

@ -1,6 +1,5 @@
/** /**
Definitions of string utility functions. Definitions of string utility functions.
@license MIT. Copyright (c) 2015 James Devlin / FluentDesk.
@module string.js @module string.js
*/ */
@ -10,6 +9,8 @@ See: http://stackoverflow.com/a/32800728/4942583
@method isNullOrWhitespace @method isNullOrWhitespace
*/ */
(function() {
String.isNullOrWhitespace = function( input ) { String.isNullOrWhitespace = function( input ) {
return !input || !input.trim(); return !input || !input.trim();
}; };
@ -21,3 +22,5 @@ String.prototype.endsWith = function(suffix) {
String.is = function( val ) { String.is = function( val ) {
return typeof val === 'string' || val instanceof String; return typeof val === 'string' || val instanceof String;
}; };
}());