1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-01-10 10:16:20 +01:00
Pinafore-Web-Client-Frontend/routes/_store/statusComputations.js
Nolan Lawson 4ef576b7f1 refactor
2018-02-27 21:01:01 -08:00

14 lines
353 B
JavaScript

import { CHAR_LIMIT } from '../_static/statuses'
export function statusComputations (store) {
store.compute('rawComposeTextLength',
['rawComposeText'],
(rawComposeText) => rawComposeText.length
)
store.compute('rawComposeTextOverLimit',
['rawComposeTextLength'],
(rawComposeTextLength) => rawComposeTextLength > CHAR_LIMIT
)
}