Created
February 29, 2016 11:19
-
-
Save nire0510/db8f7d3550627d9b0a4d to your computer and use it in GitHub Desktop.
Ember helper: performs weak equality (type agnostic)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment