https://github.com/pivotal/jasmine/wiki/Matchers Check section "Writing New Matchers".