Sha256: 920372ebd4283496145c03555cb162b1fa41d783b5c872e92ccaa23b621b4b44

Contents?: true

Size: 606 Bytes

Versions: 133

Compression:

Stored size: 606 Bytes

Contents

if (typeof String.prototype.endsWith !== 'function') {
  String.prototype.endsWith = function(suffix) {
    return this.indexOf(suffix, this.length - suffix.length) !== -1;
  };
};

if (typeof String.prototype.isBlank !== 'function') {
  String.prototype.isBlank = function() {
    return this.length == '';
  };
};

if (typeof String.prototype.isPresent !== 'function') {
  String.prototype.isPresent = function() {
    return this.length != '';
  };
};

if (typeof String.prototype.toInt !== 'function') {
  String.prototype.toInt = function() {
    return parseInt(this.replace(/,/g, '')) || 0;
  };
};

Version data entries

133 entries across 133 versions & 1 rubygems

Version Path
daddy-0.3.13 app/assets/javascripts/string.js
daddy-0.3.12 app/assets/javascripts/string.js
daddy-0.3.11 app/assets/javascripts/string.js
daddy-0.3.10 app/assets/javascripts/string.js
daddy-0.3.9 app/assets/javascripts/string.js
daddy-0.3.8 app/assets/javascripts/string.js
daddy-0.3.7 app/assets/javascripts/string.js
daddy-0.3.6 app/assets/javascripts/string.js
daddy-0.3.4 app/assets/javascripts/string.js
daddy-0.3.3 app/assets/javascripts/string.js
daddy-0.3.2 app/assets/javascripts/string.js
daddy-0.3.1 app/assets/javascripts/string.js
daddy-0.3.0 app/assets/javascripts/string.js
daddy-0.2.23 app/assets/javascripts/string.js
daddy-0.2.22 app/assets/javascripts/string.js
daddy-0.2.21 app/assets/javascripts/string.js
daddy-0.2.20 app/assets/javascripts/string.js
daddy-0.2.19 vendor/assets/javascripts/string.js
daddy-0.2.18 vendor/assets/javascripts/string.js
daddy-0.2.17 vendor/assets/javascripts/string.js