pinafore/routes/_store/statusComputations.js

14 lines
353 B
JavaScript
Raw Normal View History

2018-02-27 06:22:56 +00:00
import { CHAR_LIMIT } from '../_static/statuses'
export function statusComputations (store) {
2018-02-28 05:01:01 +00:00
store.compute('rawComposeTextLength',
['rawComposeText'],
(rawComposeText) => rawComposeText.length
2018-02-27 06:22:56 +00:00
)
2018-02-28 05:01:01 +00:00
store.compute('rawComposeTextOverLimit',
['rawComposeTextLength'],
(rawComposeTextLength) => rawComposeTextLength > CHAR_LIMIT
2018-02-27 06:22:56 +00:00
)
}