O que significa?
- Expectativa de dimensionamento dos dados;
Ex. Quantidade de usuários com acesso a uma plataforma, sazonalidades, expectativa de crescimento deles;
O que define?
- Definir as máquinas e arquitetura de software.
| import compose from './compose' | |
| export default (watchers, method) => { | |
| const shorlty = compose(watchers, | |
| (_, watcher) => ({ | |
| [watcher]: typeof method !== 'string' ? method : function () { | |
| this[method](...arguments) | |
| } | |
| }) | |
| ) |
| /** | |
| * A => B | B => A | |
| * @param {(A|B)} value | |
| * @param {A} a | |
| * @param {B} b | |
| * @template A, B | |
| * @returns {(A|B)} | |
| */ | |
| const Toggle = (a = true, b = false) => value => value === a ? b : a |
| import { cull } from 'cullender'; | |
| import { isActive, isLatest } from './validators' | |
| // ... | |
| const latest = cull( | |
| [ ...users ], | |
| isActive, | |
| isLatest | |
| ); |
| /** | |
| * Cast object in a FormData. | |
| * @param {object} object | |
| * @returns {FormData} | |
| */ | |
| export const toFormData = (object) => { | |
| const entries = Object.entries(object) | |
| const form = entries.reduce((form, [ name, value ]) => { | |
| form.append(name, value) | |
| return form |
| export const unique = (values) => [ ...new Set(values) ] | |
| export const add = (value, position = 'first') => (values) => { | |
| return position === 'first' | |
| ? [ value, ...values ] | |
| : [ ...values, value ] | |
| } |
| type CustomEventHandler = (event: any) => void; | |
| type CustomEvent = { | |
| name: string, | |
| handler: CustomEventHandler | |
| }; | |
| export default function Event (object) { | |
| const event = { | |
| list: [], |