Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 519 Bytes

primitive.md

File metadata and controls

43 lines (32 loc) · 519 Bytes

Primitives

All primitive types will be coerced into strings by vomit:

  • String
  • Boolean
  • Number
  • others

String

var str = 'Nyan'
vomit`<span>${str} the cat!</span>`

result:

<span>Nyan the cat!</span>

Boolean

var bool = true
vomit`<span>Is it ${bool} Vomit is awesome?</span>`

result:

<span>Is it true Vomit is awesome?</span>

Number

var size = 2
vomit`<span>Vomit is only ${size}kb</span>`
<span>Vomit is only 2kb</span>