spec/lib/jspec.js
function(name, body) {
      hook('addingMatcher', name, body)
      if (name.indexOf(' ') != -1) {
        var matchers = name.split(/\s+/)
        var prefix = matchers.shift()
        each(matchers, function(name) {
          JSpec.addMatcher(prefix + '_' + name, body(name))
        })
      }
      this.matchers[name] = this.normalizeMatcherMessage(this.normalizeMatcherBody(body))
      this.matchers[name].name = name
    }
function(name, body) {
      hook('addingMatcher', name, body)
      if (name.indexOf(' ') != -1) {
        var matchers = name.split(/\s+/)
        var prefix = matchers.shift()
        each(matchers, function(name) {
          JSpec.addMatcher(prefix + '_' + name, body(name))
        })
      }
      this.matchers[name] = this.normalizeMatcherMessage(this.normalizeMatcherBody(body))
      this.matchers[name].name = name
    }
function ( name , body ) { hook ( 'addingMatcher' , name , body ) if ( name . indexOf ( ' ' ) != - 1 ) { var matchers = name . split ( / \s+ / ) var prefix = matchers . shift ( ) each ( matchers , function ( name ) { JSpec . addMatcher ( prefix + '_' + name , body ( name ) ) } ) } this . matchers [ name ] = this . normalizeMatcherMessage ( this . normalizeMatcherBody ( body ) ) this . matchers [ name ] . name = name }
Define a matcher.

@param  {string} name
@param  {hash, function, string} body
@api public
Define a matcher .