![Coverage Status](https://camo.githubusercontent.com/c8af675218a3937df5278e10af886b33dae30009c4774e8cf3f47187f10a76f7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7761766564726f6d2f6269746669656c642f62616467652e7376673f6272616e63683d7472756e6b)
const render = require('bit-field/lib/render');
const onml = require('onml');
const reg = [
{bits: 8, name: 'data'}
];
const options = {
hspace: 888
};
const jsonml = render(reg, options);
const html = onml.stringify(jsonml);
// <svg...>
npx bit-field [options] > alpha.svg
Options:
--version Show version number [boolean]
-i, --input path to the source [required]
--vspace vertical space [number] [default: 80]
--hspace horizontal space [number] [default: 640]
--lanes rectangle lanes [number] [default: 2]
--bits overall bitwidth [number] [default: 32]
--fontsize font size [number] [default: 14]
--fontfamily font family [default: "sans-serif"]
--fontweight font weight [default: "normal"]
--compact compact format [boolean] [default: false]
--hflip horizontal flip [boolean] [default: false]
--vflip vertical flip [boolean] [default: false]
--help Show help [boolean]
[
{ "name": "IPO", "bits": 8, "attr": "RO" },
{ "bits": 7 },
{ "name": "BRK", "bits": 5, "attr": "RW", "type": 4 },
{ "name": "CPK", "bits": 1 },
{ "name": "Clear", "bits": 3 },
{ "bits": 8 }
]
![Heat Sink](test/alpha.svg)
https://observablehq.com/collection/@drom/bitfield