Sha256: 386aaaef5eba6d6033fb94e1c3b669c5b0ea671efc51f68cb04f1ce7f0311160

Contents?: true

Size: 580 Bytes

Versions: 16

Compression:

Stored size: 580 Bytes

Contents

/*!
 * Should
 * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
 * MIT Licensed
 */

module.exports = function(should, Assertion) {
  Assertion.add('startWith', function(str, description) {
    this.params = { operator: 'to start with ' + should.format(str), message: description };

    this.assert(0 === this.obj.indexOf(str));
  });

  Assertion.add('endWith', function(str, description) {
    this.params = { operator: 'to end with ' + should.format(str), message: description };

    this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0);
  });
};

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
stylus-source-0.42.2 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.42.1 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.42.0 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.41.3 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.41.2 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.41.1 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.41.0 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.40.3 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.40.2 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.40.1 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.40.0 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.39.4 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.39.3 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.39.2 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.39.1 vendor/node_modules/should/lib/ext/string.js
stylus-source-0.39.0 vendor/node_modules/should/lib/ext/string.js