mongoose-erd-generator
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "mongoose-erd-generator", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Mongoose-erd-generator | ||
=============================== | ||
NodeJS Buffer interface provides a way to manipulate bytes, but what if we needed to manipulate bits? | ||
a tool that extracts information from mongoose schemas and turns them to an ERD diagram. | ||
This library was created to address the gap of a built-in bit interface. | ||
@@ -18,56 +17,18 @@ [![Build Status](https://travis-ci.org/jodevsa/node-bitview.svg?branch=master)](https://travis-ci.org/jodevsa/node-bitview) | ||
`npm install bitview --save` | ||
`npm install mongoose-erd-generator -g` | ||
Initializing a view | ||
Running the script | ||
----- | ||
new BitView(Length) | ||
new BitView(buffer) | ||
new BitView(buffer, byteOffset, length); | ||
Buffer.from(arg) | ||
mongoose-erd-generator -o modelsPath | ||
##### Parameters: | ||
length: length in bits | ||
buffer: use an existing buffer | ||
arg: Another interface to create a new BitView instance | ||
arg could be an array of bits [1,0,1] or a string '1010' or a buffer. | ||
byteOffset: default 0, starting offset of the bitview. | ||
##### options: | ||
Usage: mongoose-erd-generator [options] | ||
Methods | ||
----- | ||
### .flip(pos) | ||
flips the value of the bit at location pos | ||
### .get(pos) | ||
Returns the value of the bit at location pos (0 or 1) | ||
### .set(pos,v) | ||
Sets the value of a bit at location pos to v | ||
### .toString() | ||
Returns a string representation of the BitView. | ||
### .toBuffer() | ||
Returns the buffer used by the view. | ||
Properties | ||
----- | ||
### .length | ||
Returns length in bits. | ||
Options: | ||
Usage: | ||
```javascript | ||
const BitView = require("bitview") | ||
const view= new BitView(10); | ||
view.set(0,true); | ||
console.log(view.get(0)); // true | ||
view.flip(0) | ||
console.log(view.get(0)); // false | ||
const view2=BitView.from('101010'); | ||
console.log(view2.get(2)); // true | ||
const view3=BitView.from([1, 0, 1]); | ||
console.log(view3.get(1)); // false | ||
console.log(view3.get(2)); // true | ||
``` | ||
Implementation | ||
---------------------- | ||
BitView uses bitwise operations to manipulate each bit in a buffer (Low Complexity) | ||
-V, --version output the version number | ||
-p, --path <path> set models path wanted to generate an ERD from. | ||
-o, --output <path> set output path | ||
-f, --format [svg,dot,xdot,plain,plan-ext,ps,ps2,json,json0] | ||
-c, --color <color> | ||
-h, --help |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9954
34