npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

bit-field

1.1.0 • Public • Published

NPM version Travis appVeyor

Install

npm i bit-field

Library usage

var render = require('bit-filed/lib/render');
var onml = require('onml');
 
var reg = [
  {bits: 8, name: 'data'}
];
 
var options = {
  hspace: 888
};
 
var jsonml = render(reg, options);
var html = onml.stringify(jsonml);
// <svg...>

CLI Usage

npx bit-field [options] > alpha.svg

options

Options:
  --version     Show version number                                    [boolean]
  --input, -i   path to the source                                    [required]
  --vspace      vertical space                                     [default: 80]
  --hspace      horizontal space                                  [default: 640]
  --lanes       rectangle lanes                                     [default: 2]
  --bits        overall bitwidth                                   [default: 32]
  --fontsize    font size                                          [default: 14]
  --bigendian   endianness                                      [default: false]
  --fontfamily  font family                              [default: "sans-serif"]
  --fontweight  font weight                                  [default: "normal"]
  --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

Heat Sink

Online Examples

Keywords

install

npm i bit-field

Downloadsweekly downloads

207

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability