1.9.0 • Published 2 months ago
bit-field v1.9.0
Install
npm i bit-field
Library usage
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...>
CLI Usage
npx bit-field [options] > alpha.svg
options
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]
--trim trim long names [number]
--offset offset the index lanes [number]
--help Show help [boolean]
alpha.json
[
{ "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 }
]
alpha.svg
Online Examples
1.9.0
2 months ago
1.8.0
1 year ago
1.7.0
1 year ago
1.6.0
2 years ago
1.5.3
3 years ago
1.5.2
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.0
3 years ago
1.3.6
4 years ago
1.3.5
4 years ago
1.3.4
4 years ago
1.3.3
4 years ago
1.3.2
4 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.0
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.9.0
5 years ago
0.8.0
5 years ago
0.7.4
5 years ago
0.7.3
5 years ago
0.7.2
5 years ago
0.7.1
5 years ago
0.7.0
5 years ago
0.6.1
6 years ago
0.6.0
6 years ago
0.5.0
6 years ago
0.4.0
6 years ago
0.3.0
6 years ago
0.2.3
7 years ago
0.2.2
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago