Sha256: 48c2e1ace21184758fc3ddf1099b933402bbf75f1ff460db9f82cc384e8264c7

Contents?: true

Size: 798 Bytes

Versions: 2

Compression:

Stored size: 798 Bytes

Contents

String.prototype.startsWith = function (prefix, ignoreCase) {
    var _prefix = prefix.source ? prefix.source : prefix.escapeRegExp();
    return this.match(new RegExp("^" + _prefix, ignoreCase ? 'i' : ''));
};

String.prototype.endsWith = function (suffix, ignoreCase) {
    var _suffix = suffix.source ? suffix.source : suffix.escapeRegExp();
    return this.match(new RegExp(_suffix + "$", ignoreCase ? 'i' : ''));
};

String.prototype.escapeRegExp = function() {
    return this.replace(/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
};

String.prototype.toRegExp = function(options) {
    return new RegExp(this.escapeRegExp(), options);
};

Array.prototype.uniq = function () {
    return this.filter(function (itm, i, a) {
        return i == a.indexOf(itm);
    });
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitter_bootstrap_builder-0.0.4 vendor/assets/javascripts/twitter_bootstrap_builder.js
twitter_bootstrap_builder-0.0.3 vendor/assets/javascripts/twitter_bootstrap_builder.js