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.5.23 app/assets/javascripts/string.js
daddy-0.5.22 app/assets/javascripts/string.js
daddy-0.5.21 app/assets/javascripts/string.js
daddy-0.5.20 app/assets/javascripts/string.js
daddy-0.5.19 app/assets/javascripts/string.js
daddy-0.5.18 app/assets/javascripts/string.js
daddy-0.5.17 app/assets/javascripts/string.js
daddy-0.5.16 app/assets/javascripts/string.js
daddy-0.5.15 app/assets/javascripts/string.js
daddy-0.5.14 app/assets/javascripts/string.js
daddy-0.5.13 app/assets/javascripts/string.js
daddy-0.5.12 app/assets/javascripts/string.js
daddy-0.5.11 app/assets/javascripts/string.js
daddy-0.5.10 app/assets/javascripts/string.js
daddy-0.5.9 app/assets/javascripts/string.js
daddy-0.5.8 app/assets/javascripts/string.js
daddy-0.5.7 app/assets/javascripts/string.js
daddy-0.5.6 app/assets/javascripts/string.js
daddy-0.5.5 app/assets/javascripts/string.js
daddy-0.5.4 app/assets/javascripts/string.js