mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
10 lines
238 B
Plaintext
10 lines
238 B
Plaintext
|
|
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();
|
||
|
|
}
|
||
|
|
});
|