2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/app/assets/javascripts/select-box-kit/mixins/utils.js.es6

10 lines
238 B
Text
Raw Normal View History

2017-10-19 12:51:08 -07:00
export default Ember.Mixin.create({
_castInteger(value) {
if (this.get("castInteger") === true && Ember.isPresent(value)) {
return parseInt(value, 10);
}
return Ember.isNone(value) ? value : value.toString();
}
});