nit:
`var displayVal = type === 'short';`