Comparing version 1.0.1 to 1.1.0
@@ -33,3 +33,3 @@ declare const inspectSymbol: unique symbol; | ||
} | ||
declare class DAGEntry<T> { | ||
export declare class DAGEntry<T> { | ||
readonly data: DAGData<T>; | ||
@@ -36,0 +36,0 @@ readonly index: number; |
@@ -7,3 +7,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GoodDAG = void 0; | ||
exports.DAGEntry = exports.GoodDAG = void 0; | ||
const inspectSymbol = Symbol.for('nodejs.util.inspect.custom'); | ||
@@ -110,2 +110,3 @@ const util_1 = require("util"); | ||
} | ||
exports.DAGEntry = DAGEntry; | ||
// double bitwise negation floors and casts to overflow 4-byte signed | ||
@@ -112,0 +113,0 @@ const isLongInt = (i) => { |
@@ -33,3 +33,3 @@ declare const inspectSymbol: unique symbol; | ||
} | ||
declare class DAGEntry<T> { | ||
export declare class DAGEntry<T> { | ||
readonly data: DAGData<T>; | ||
@@ -36,0 +36,0 @@ readonly index: number; |
@@ -57,3 +57,3 @@ // a directed acyclic graph using a linked list | ||
} | ||
class DAGEntry { | ||
export class DAGEntry { | ||
data; | ||
@@ -60,0 +60,0 @@ index; |
{ | ||
"name": "good-dag", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "fast expandable directed acyclic graph using linked lists", | ||
@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)", |
@@ -122,2 +122,17 @@ # good-dag | ||
## Class: `DAGEntry` | ||
This is the class used for every entry _other than_ the root. | ||
It is not intended to be instantiated directly, but it is | ||
exported for the benefit of class-extension use cases, | ||
`instanceof` type checking, and so on. | ||
`DAGEntry` instances have all the same methods and properties as | ||
`GoodDAG`. The only difference is that they do not create an | ||
underlying data store on creation, and instead use their | ||
parent's. | ||
Instantiate `DAGEntry` classes by calling `dag.append(data)`. | ||
## Performance, Memory, and `blockSize` Tuning | ||
@@ -124,0 +139,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39548
607
208