mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-05 09:56:22 +00:00
Scrub string.js.
Will probably be retired in favor of Node reusables.
This commit is contained in:
parent
483207e5a0
commit
b803eba934
@ -1,6 +1,5 @@
|
||||
/**
|
||||
Definitions of string utility functions.
|
||||
@license MIT. Copyright (c) 2015 James Devlin / FluentDesk.
|
||||
@module string.js
|
||||
*/
|
||||
|
||||
@ -10,14 +9,18 @@ See: http://stackoverflow.com/a/32800728/4942583
|
||||
@method isNullOrWhitespace
|
||||
*/
|
||||
|
||||
String.isNullOrWhitespace = function( input ) {
|
||||
return !input || !input.trim();
|
||||
};
|
||||
(function() {
|
||||
|
||||
String.prototype.endsWith = function(suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
String.isNullOrWhitespace = function( input ) {
|
||||
return !input || !input.trim();
|
||||
};
|
||||
|
||||
String.is = function( val ) {
|
||||
return typeof val === 'string' || val instanceof String;
|
||||
};
|
||||
String.prototype.endsWith = function(suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
|
||||
String.is = function( val ) {
|
||||
return typeof val === 'string' || val instanceof String;
|
||||
};
|
||||
|
||||
}());
|
||||
|
Loading…
Reference in New Issue
Block a user