/hassium

ES2015 Template Tag for JSON

Primary LanguageJavaScript

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 }