nire0510
2/29/2016 - 11:19 AM

Ember helper: performs weak equality (type agnostic)

Ember helper: performs weak equality (type agnostic)

import Ember from 'ember';

/**
 * Performs weak equality comparison between two objects
 * @param params
 * @returns {boolean}
 */
export function eqw(params/*, hash*/) {
  /*jslint eqeq: true*/
  return params[0] == params[1];
  /*jslint eqeq: false*/
}

/**
 * Extension to Ember ember truth helpers
 * @summary Performs weak equality comparison between two objects
 * @class
 */
export default Ember.Helper.helper(eqw);