Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

bitfield

> 编程语言
Open source

:cake: bit field diagram renderer

393 stars0 likes4 views
WebsiteGitHub

About

:cake: bit field diagram renderer

Install

bash
npm i bit-field

Library usage

javascript
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);
// 

CLI Usage

bash
npx bit-field [options] > alpha.svg

options

…

alpha.json

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

https://observablehq.com/collection/@drom/bitfield

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScripthacktoberfest

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言