npm.io
2.0.0 • Published 8 years ago

hassium

Licence
MIT
Version
2.0.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
1

hassium

ES2015 Template Tag for JSON. Powered by Proxy

Build Status

Usage

import hs from 'hassium'

const wrapBooleanInObject = hs`{"x": ${Boolean}}`
wrapBooleanInObject({})
  // => {"x": true}

const mapInnerValue = hs`{"x": ${hs.lol.length}}`
mapInnerValue({lol: ['something']})
  // => {"x": 1}