Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dags/dag

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dags/dag - npm Package Compare versions

Comparing version 0.2.12 to 0.3.0

0

CHANGELOG.md

@@ -0,0 +0,0 @@ # Change Log

112

dist/cjs/__tests__/dag.js

@@ -37,16 +37,16 @@ "use strict";

beforeEach(function () {
dag = new _dag.Dag(new UIDMock());
dag = new _dag.Dag(UIDMock);
});
describe("constructor", function () {
it("Should execute without any problem", function () {
describe('constructor', function () {
it('Should execute without any problem', function () {
expect(function () {
return new _dag.Dag(new UIDMock());
return new _dag.Dag(UIDMock);
}).not.toThrow();
});
it("Should return an empty nodeset", function () {
it('Should return an empty nodeset', function () {
expect(dag.getNodes().size).toBe(0);
});
});
describe("getNodes", function () {
it("Should return an actual dag nodeset", function () {
describe('getNodes', function () {
it('Should return an actual dag nodeset', function () {
expect(dag.getNodes().size).toBe(0);

@@ -59,12 +59,4 @@ var nodeUID = dag.newNode();

});
describe("newUID", function () {
it("Should return a value of type 'object'", function () {
expect(typeof dag.newUID()).toBe('object');
});
it("Should return a unique value", function () {
expect(dag.newUID() == dag.newUID()).not.toBe(true);
});
});
describe("newNode", function () {
it("Should increase a nodeset size", function () {
describe('newNode', function () {
it('Should increase a nodeset size', function () {
dag.newNode();

@@ -75,3 +67,3 @@ expect(dag.getNodes().size).toBe(1);

});
it("Should insert nodeUID in the nodeset", function () {
it('Should insert nodeUID in the nodeset', function () {
var nodeUID1 = dag.newNode();

@@ -83,3 +75,3 @@ expect(dag.getNodes()).toContain(nodeUID1);

});
describe("deleteNode", function () {
describe('deleteNode', function () {
var node1;

@@ -91,6 +83,6 @@ var node2;

});
it("Should return this dag", function () {
it('Should return this dag', function () {
expect(dag.deleteNode(node1)).toBe(dag);
});
it("Should decrease a nodeset size", function () {
it('Should decrease a nodeset size', function () {
expect(dag.getNodes().size).toBe(2);

@@ -100,7 +92,7 @@ expect(dag.deleteNode(node1).getNodes().size).toBe(1);

});
it("Should remove nodeUID from the nodeset", function () {
it('Should remove nodeUID from the nodeset', function () {
expect(dag.deleteNode(node1).getNodes()).not.toContain(node1);
expect(dag.deleteNode(node2).getNodes()).not.toContain(node1);
});
it("Should remove a parent-child relationships of the given node", function () {
it('Should remove a parent-child relationships of the given node', function () {
var node = dag.newNode();

@@ -122,8 +114,8 @@ var parent1 = dag.newNode();

});
describe("getParents", function () {
it("Should return an empty parent set of the given node", function () {
describe('getParents', function () {
it('Should return an empty parent set of the given node', function () {
var node = dag.newNode();
expect(dag.getParents(node).size).toBe(0);
});
it("Should return an actual parent set of the given node", function () {
it('Should return an actual parent set of the given node', function () {
var current = dag.newNode();

@@ -137,9 +129,9 @@ var parent = dag.newNode();

});
it("Should throw an error in case of orphan given node", function () {
it('Should throw an error in case of orphan given node', function () {
expect(function () {
return dag.getParents(dag.newUID());
return dag.getParents(new dag.uid());
}).toThrowError("node doesn't belong to this graph");
});
});
describe("setParenthood", function () {
describe('setParenthood', function () {
var child;

@@ -151,15 +143,15 @@ var parent;

});
it("Should throw an error in case of both orphan UIDs", function () {
it('Should throw an error in case of both orphan UIDs', function () {
expect(function () {
return dag.setParenthood(dag.newUID(), dag.newUID());
return dag.setParenthood(new dag.uid(), new dag.uid());
}).toThrowError();
});
it("Should throw an Error in case of orphan currentNode", function () {
it('Should throw an Error in case of orphan currentNode', function () {
expect(function () {
return dag.setParenthood(dag.newUID(), parent);
return dag.setParenthood(new dag.uid(), parent);
}).toThrowError("Child node doesn't belong to this graph");
});
it("Should throw an Error in case of orphan parent", function () {
it('Should throw an Error in case of orphan parent', function () {
expect(function () {
return dag.setParenthood(child, dag.newUID());
return dag.setParenthood(child, new dag.uid());
}).toThrowError("Parent node doesn't belong to this graph");

@@ -170,3 +162,3 @@ });

});
it("Should add the given parent to the given parent set", function () {
it('Should add the given parent to the given parent set', function () {
expect(dag.getParents(child)).not.toContain(parent);

@@ -181,12 +173,12 @@ dag.setParenthood(child, parent);

});
it("Should throw an Error when a parenthood established with itself", function () {
it('Should throw an Error when a parenthood established with itself', function () {
expect(function () {
return dag.setParenthood(child, child);
}).toThrowError("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
}).toThrowError('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
});
it("Should throw an error when parenthood establishing leads to a cycle", function () {
it('Should throw an error when parenthood establishing leads to a cycle', function () {
dag.setParenthood(child, parent);
expect(function () {
return dag.setParenthood(parent, child);
}).toThrowError("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
}).toThrowError('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
var grandson = dag.newNode();

@@ -196,6 +188,6 @@ dag.setParenthood(grandson, child);

return dag.setParenthood(parent, grandson);
}).toThrowError("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
}).toThrowError('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
});
});
describe("removeParenthood", function () {
describe('removeParenthood', function () {
var child;

@@ -211,15 +203,15 @@ var parent;

});
it("Should throw an error in case of both orphan UIDs", function () {
it('Should throw an error in case of both orphan UIDs', function () {
expect(function () {
return dag.removeParenthood(dag.newUID(), dag.newUID());
return dag.removeParenthood(new dag.uid(), new dag.uid());
}).toThrowError();
});
it("Should throw an Error in case of orphan currentNode", function () {
it('Should throw an Error in case of orphan currentNode', function () {
expect(function () {
return dag.removeParenthood(dag.newUID(), parent);
return dag.removeParenthood(new dag.uid(), parent);
}).toThrowError("Child node doesn't belong to this graph");
});
it("Should throw an Error in case of orphan parent", function () {
it('Should throw an Error in case of orphan parent', function () {
expect(function () {
return dag.removeParenthood(child, dag.newUID());
return dag.removeParenthood(child, new dag.uid());
}).toThrowError("Parent node doesn't belong to this graph");

@@ -230,3 +222,3 @@ });

});
it("Should remove the given parent from the given parent set", function () {
it('Should remove the given parent from the given parent set', function () {
expect(dag.getParents(child)).toContain(parent);

@@ -242,3 +234,3 @@ dag.removeParenthood(child, parent);

});
describe("getChildren", function () {
describe('getChildren', function () {
it('Should return empty child set of the given node', function () {

@@ -248,3 +240,3 @@ var node = dag.newNode();

});
it("Should return an actual child set of the given node", function () {
it('Should return an actual child set of the given node', function () {
var current = dag.newNode();

@@ -258,9 +250,9 @@ var child = dag.newNode();

});
it("Should throw an error in case of orphan given node", function () {
it('Should throw an error in case of orphan given node', function () {
expect(function () {
return dag.getChildren(dag.newUID());
return dag.getChildren(new dag.uid());
}).toThrowError("node doesn't belong to this graph");
});
});
describe("isDescendant", function () {
describe('isDescendant', function () {
var node;

@@ -276,18 +268,18 @@ var son;

});
it("Should return false on arbitrary new node pair", function () {
it('Should return false on arbitrary new node pair', function () {
expect(dag.isDescendant(dag.newNode(), dag.newNode())).toBe(false);
});
it("Should return true when parenthood establishing leads to a cycle", function () {
it('Should return true when parenthood establishing leads to a cycle', function () {
expect(dag.isDescendant(node, node)).toBe(true);
});
it("Should return true for node and child", function () {
it('Should return true for node and child', function () {
expect(dag.isDescendant(node, son)).toBe(true);
});
it("Should return false for child and node", function () {
it('Should return false for child and node', function () {
expect(dag.isDescendant(son, node)).toBe(false);
});
it("Should return true for node and grandson", function () {
it('Should return true for node and grandson', function () {
expect(dag.isDescendant(node, son)).toBe(true);
});
it("Should return false for grandson and node ", function () {
it('Should return false for grandson and node ', function () {
expect(dag.isDescendant(son, node)).toBe(false);

@@ -294,0 +286,0 @@ });

@@ -15,2 +15,6 @@ "use strict";

/**
* Required interface of the UID Constructor
*/
/**
* Required interface of the Dag

@@ -45,6 +49,6 @@ */

* @constructor
* @param dagUID uid of this dag
* @param uid constructor for UIDs
*/
function Dag(dagUID) {
this.dagUID = dagUID;
function Dag(uid) {
this.uid = uid;

@@ -58,4 +62,4 @@ _defineProperty(this, "_nodes", new Set());

/**
* Generate a new uid
* @return some new uid.
* Create new node of this graph.
* @return {UID} uid of the new node
*/

@@ -66,13 +70,4 @@

_proto.newUID = function newUID() {
return this.dagUID.newUID();
}
/**
* Create new node of this graph.
* @return {UID} uid of the new node
*/
;
_proto.newNode = function newNode() {
var nodeUID = this.newUID();
var nodeUID = new this.uid();

@@ -158,3 +153,3 @@ this._nodes.add(nodeUID);

* from the parent node as a child.
* @return {Dag<T>>} this dag
* @return {Dag} this dag
*/

@@ -178,5 +173,3 @@ ;

_proto.isDescendant = function isDescendant(current, tested) {
if (current.equals(tested)) {
return true;
}
if (current.equals(tested)) return true;

@@ -195,5 +188,3 @@ for (var _iterator3 = _createForOfIteratorHelperLoose(this.getChildren(current)), _step3; !(_step3 = _iterator3()).done;) {

_proto.checkCycle = function checkCycle(child, parent) {
if (this.isDescendant(child, parent)) {
throw new Error("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
}
if (this.isDescendant(child, parent)) throw new Error('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
};

@@ -200,0 +191,0 @@

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Dag } from '../dag';

@@ -26,14 +27,14 @@ export class UIDMock {

beforeEach(function () {
dag = new Dag(new UIDMock());
dag = new Dag(UIDMock);
});
describe("constructor", () => {
it("Should execute without any problem", () => {
expect(() => new Dag(new UIDMock())).not.toThrow();
describe('constructor', () => {
it('Should execute without any problem', () => {
expect(() => new Dag(UIDMock)).not.toThrow();
});
it("Should return an empty nodeset", () => {
it('Should return an empty nodeset', () => {
expect(dag.getNodes().size).toBe(0);
});
});
describe("getNodes", () => {
it("Should return an actual dag nodeset", () => {
describe('getNodes', () => {
it('Should return an actual dag nodeset', () => {
expect(dag.getNodes().size).toBe(0);

@@ -46,12 +47,4 @@ var nodeUID = dag.newNode();

});
describe("newUID", () => {
it("Should return a value of type 'object'", () => {
expect(typeof dag.newUID()).toBe('object');
});
it("Should return a unique value", () => {
expect(dag.newUID() == dag.newUID()).not.toBe(true);
});
});
describe("newNode", () => {
it("Should increase a nodeset size", () => {
describe('newNode', () => {
it('Should increase a nodeset size', () => {
dag.newNode();

@@ -62,3 +55,3 @@ expect(dag.getNodes().size).toBe(1);

});
it("Should insert nodeUID in the nodeset", () => {
it('Should insert nodeUID in the nodeset', () => {
var nodeUID1 = dag.newNode();

@@ -70,3 +63,3 @@ expect(dag.getNodes()).toContain(nodeUID1);

});
describe("deleteNode", () => {
describe('deleteNode', () => {
var node1;

@@ -78,6 +71,6 @@ var node2;

});
it("Should return this dag", () => {
it('Should return this dag', () => {
expect(dag.deleteNode(node1)).toBe(dag);
});
it("Should decrease a nodeset size", () => {
it('Should decrease a nodeset size', () => {
expect(dag.getNodes().size).toBe(2);

@@ -87,7 +80,7 @@ expect(dag.deleteNode(node1).getNodes().size).toBe(1);

});
it("Should remove nodeUID from the nodeset", () => {
it('Should remove nodeUID from the nodeset', () => {
expect(dag.deleteNode(node1).getNodes()).not.toContain(node1);
expect(dag.deleteNode(node2).getNodes()).not.toContain(node1);
});
it("Should remove a parent-child relationships of the given node", () => {
it('Should remove a parent-child relationships of the given node', () => {
var node = dag.newNode();

@@ -109,8 +102,8 @@ var parent1 = dag.newNode();

});
describe("getParents", () => {
it("Should return an empty parent set of the given node", () => {
describe('getParents', () => {
it('Should return an empty parent set of the given node', () => {
var node = dag.newNode();
expect(dag.getParents(node).size).toBe(0);
});
it("Should return an actual parent set of the given node", () => {
it('Should return an actual parent set of the given node', () => {
var current = dag.newNode();

@@ -124,7 +117,9 @@ var parent = dag.newNode();

});
it("Should throw an error in case of orphan given node", () => {
expect(() => dag.getParents(dag.newUID())).toThrowError("node doesn't belong to this graph");
it('Should throw an error in case of orphan given node', () => {
expect(() => {
return dag.getParents(new dag.uid());
}).toThrowError("node doesn't belong to this graph");
});
});
describe("setParenthood", () => {
describe('setParenthood', () => {
var child;

@@ -136,10 +131,10 @@ var parent;

});
it("Should throw an error in case of both orphan UIDs", () => {
expect(() => dag.setParenthood(dag.newUID(), dag.newUID())).toThrowError();
it('Should throw an error in case of both orphan UIDs', () => {
expect(() => dag.setParenthood(new dag.uid(), new dag.uid())).toThrowError();
});
it("Should throw an Error in case of orphan currentNode", () => {
expect(() => dag.setParenthood(dag.newUID(), parent)).toThrowError("Child node doesn't belong to this graph");
it('Should throw an Error in case of orphan currentNode', () => {
expect(() => dag.setParenthood(new dag.uid(), parent)).toThrowError("Child node doesn't belong to this graph");
});
it("Should throw an Error in case of orphan parent", () => {
expect(() => dag.setParenthood(child, dag.newUID())).toThrowError("Parent node doesn't belong to this graph");
it('Should throw an Error in case of orphan parent', () => {
expect(() => dag.setParenthood(child, new dag.uid())).toThrowError("Parent node doesn't belong to this graph");
});

@@ -149,3 +144,3 @@ it('Should return this dag', () => {

});
it("Should add the given parent to the given parent set", () => {
it('Should add the given parent to the given parent set', () => {
expect(dag.getParents(child)).not.toContain(parent);

@@ -160,14 +155,14 @@ dag.setParenthood(child, parent);

});
it("Should throw an Error when a parenthood established with itself", () => {
expect(() => dag.setParenthood(child, child)).toThrowError("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
it('Should throw an Error when a parenthood established with itself', () => {
expect(() => dag.setParenthood(child, child)).toThrowError('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
});
it("Should throw an error when parenthood establishing leads to a cycle", () => {
it('Should throw an error when parenthood establishing leads to a cycle', () => {
dag.setParenthood(child, parent);
expect(() => dag.setParenthood(parent, child)).toThrowError("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
expect(() => dag.setParenthood(parent, child)).toThrowError('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
var grandson = dag.newNode();
dag.setParenthood(grandson, child);
expect(() => dag.setParenthood(parent, grandson)).toThrowError("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
expect(() => dag.setParenthood(parent, grandson)).toThrowError('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
});
});
describe("removeParenthood", () => {
describe('removeParenthood', () => {
var child;

@@ -183,10 +178,10 @@ var parent;

});
it("Should throw an error in case of both orphan UIDs", () => {
expect(() => dag.removeParenthood(dag.newUID(), dag.newUID())).toThrowError();
it('Should throw an error in case of both orphan UIDs', () => {
expect(() => dag.removeParenthood(new dag.uid(), new dag.uid())).toThrowError();
});
it("Should throw an Error in case of orphan currentNode", () => {
expect(() => dag.removeParenthood(dag.newUID(), parent)).toThrowError("Child node doesn't belong to this graph");
it('Should throw an Error in case of orphan currentNode', () => {
expect(() => dag.removeParenthood(new dag.uid(), parent)).toThrowError("Child node doesn't belong to this graph");
});
it("Should throw an Error in case of orphan parent", () => {
expect(() => dag.removeParenthood(child, dag.newUID())).toThrowError("Parent node doesn't belong to this graph");
it('Should throw an Error in case of orphan parent', () => {
expect(() => dag.removeParenthood(child, new dag.uid())).toThrowError("Parent node doesn't belong to this graph");
});

@@ -196,3 +191,3 @@ it('Should return this dag', () => {

});
it("Should remove the given parent from the given parent set", () => {
it('Should remove the given parent from the given parent set', () => {
expect(dag.getParents(child)).toContain(parent);

@@ -208,3 +203,3 @@ dag.removeParenthood(child, parent);

});
describe("getChildren", () => {
describe('getChildren', () => {
it('Should return empty child set of the given node', () => {

@@ -214,3 +209,3 @@ var node = dag.newNode();

});
it("Should return an actual child set of the given node", () => {
it('Should return an actual child set of the given node', () => {
var current = dag.newNode();

@@ -224,7 +219,7 @@ var child = dag.newNode();

});
it("Should throw an error in case of orphan given node", () => {
expect(() => dag.getChildren(dag.newUID())).toThrowError("node doesn't belong to this graph");
it('Should throw an error in case of orphan given node', () => {
expect(() => dag.getChildren(new dag.uid())).toThrowError("node doesn't belong to this graph");
});
});
describe("isDescendant", () => {
describe('isDescendant', () => {
var node;

@@ -240,18 +235,18 @@ var son;

});
it("Should return false on arbitrary new node pair", () => {
it('Should return false on arbitrary new node pair', () => {
expect(dag.isDescendant(dag.newNode(), dag.newNode())).toBe(false);
});
it("Should return true when parenthood establishing leads to a cycle", () => {
it('Should return true when parenthood establishing leads to a cycle', () => {
expect(dag.isDescendant(node, node)).toBe(true);
});
it("Should return true for node and child", () => {
it('Should return true for node and child', () => {
expect(dag.isDescendant(node, son)).toBe(true);
});
it("Should return false for child and node", () => {
it('Should return false for child and node', () => {
expect(dag.isDescendant(son, node)).toBe(false);
});
it("Should return true for node and grandson", () => {
it('Should return true for node and grandson', () => {
expect(dag.isDescendant(node, son)).toBe(true);
});
it("Should return false for grandson and node ", () => {
it('Should return false for grandson and node ', () => {
expect(dag.isDescendant(son, node)).toBe(false);

@@ -258,0 +253,0 @@ });

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/**
* Required interface of the UID Constructor
*/
/**
* Required interface of the Dag

@@ -33,6 +37,6 @@ */

* @constructor
* @param dagUID uid of this dag
* @param uid constructor for UIDs
*/
constructor(dagUID) {
this.dagUID = dagUID;
constructor(uid) {
this.uid = uid;

@@ -46,11 +50,2 @@ _defineProperty(this, "_nodes", new Set());

/**
* Generate a new uid
* @return some new uid.
*/
newUID() {
return this.dagUID.newUID();
}
/**
* Create new node of this graph.

@@ -62,3 +57,3 @@ * @return {UID} uid of the new node

newNode() {
var nodeUID = this.newUID();
var nodeUID = new this.uid();

@@ -142,3 +137,3 @@ this._nodes.add(nodeUID);

* from the parent node as a child.
* @return {Dag<T>>} this dag
* @return {Dag} this dag
*/

@@ -162,5 +157,3 @@

isDescendant(current, tested) {
if (current.equals(tested)) {
return true;
}
if (current.equals(tested)) return true;

@@ -177,5 +170,3 @@ for (var child of this.getChildren(current)) {

checkCycle(child, parent) {
if (this.isDescendant(child, parent)) {
throw new Error("The Parent-child relationship is not possible: this parenthood establishing leads to a cycle");
}
if (this.isDescendant(child, parent)) throw new Error('The Parent-child relationship is not possible: this parenthood establishing leads to a cycle');
}

@@ -182,0 +173,0 @@

@@ -0,0 +0,0 @@ import { UID } from '../dag';

/**
* Required interface of the UID Constructor
*/
export interface UIDConstructor {
new (): UID;
}
/**
* Required interface of the Dag

@@ -6,6 +12,2 @@ */

/**
* Generate new UID
*/
newUID(): any;
/**
* Check equality to the given UID

@@ -19,4 +21,4 @@ * @param uid

*/
export declare class Dag<T extends UID> {
private dagUID;
export declare class Dag {
uid: UIDConstructor;
/**

@@ -44,15 +46,10 @@ * Set of nodes of the graph

* @constructor
* @param dagUID uid of this dag
* @param uid constructor for UIDs
*/
constructor(dagUID: T);
constructor(uid: UIDConstructor);
/**
* Generate a new uid
* @return some new uid.
*/
newUID(): T;
/**
* Create new node of this graph.
* @return {UID} uid of the new node
*/
newNode(): T;
newNode(): UID;
/**

@@ -63,7 +60,7 @@ * Delete a node from nodeset of this graph.

*/
deleteNode(node: T): Dag<T>;
deleteNode(node: UID): Dag;
/**
* @return nodeset of this dag
*/
getNodes(): Set<T>;
getNodes(): Set<UID>;
/**

@@ -74,3 +71,3 @@ * Obtain parents of the given node.

*/
getParents(node: T): Set<T>;
getParents(node: UID): Set<UID>;
/**

@@ -81,3 +78,3 @@ * Obtain children of the given node.

*/
getChildren(node: T): Set<T>;
getChildren(node: UID): Set<UID>;
/**

@@ -87,9 +84,9 @@ * Add parent node to the given node and implicitly add given node to the parent node as a child.

*/
setParenthood(child: T, parent: T): Dag<T>;
setParenthood(child: UID, parent: UID): Dag;
/**
* Remove parent node from the given node and implicitly remove the given node.
* from the parent node as a child.
* @return {Dag<T>>} this dag
* @return {Dag} this dag
*/
removeParenthood(child: T, parent: T): Dag<T>;
removeParenthood(child: UID, parent: UID): Dag;
/**

@@ -100,4 +97,4 @@ * Checking if the node being checked is a descendant or not.

*/
isDescendant(current: T, tested: T): boolean;
isDescendant(current: UID, tested: UID): boolean;
private checkCycle;
}
export * from './dag';

@@ -1,6 +0,5 @@

const baseConfig = require("../../jest.config")
const baseConfig = require('../../jest.config')
module.exports = {
...baseConfig,
...baseConfig
}
{
"name": "@dags/dag",
"version": "0.2.12",
"description": "Core DAG code",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"typings": "dist/types/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/AlexanderLapygin/dags.git"
},
"homepage": "https://github.com/AlexanderLapygin/dags/blob/master/packages/dag/README.md",
"author": "Alexander Lapygin <alexanderlapygin@gmail.com>",
"license": "MIT",
"scripts": {
"prebuild": "npm run clean",
"build": "concurrently yarn:build:*",
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps",
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps",
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"clean": "rimraf *.d.ts coverage dist",
"test": "jest",
"test:coverage": "yarn test --coverage",
"pub:test": "yarn publish --access public"
},
"files": [
"*.js",
"*.d.ts",
"dist"
],
"keywords": [
"data structure",
"dag",
"graph",
"typescript"
],
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"gitHead": "534b89d9754271e6b5b7b1b659985b6e91d6e9fc"
"name": "@dags/dag",
"version": "0.3.0",
"description": "Core DAG code",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"typings": "dist/types/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/AlexanderLapygin/dags.git"
},
"homepage": "https://github.com/AlexanderLapygin/dags/blob/master/packages/dag/README.md",
"author": "Alexander Lapygin <alexanderlapygin@gmail.com>",
"license": "MIT",
"scripts": {
"prebuild": "npm run clean",
"build": "concurrently yarn:build:*",
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts -d dist/esm --source-maps",
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts -d dist/cjs --source-maps",
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"clean": "rimraf *.d.ts coverage dist",
"lint": "concurrently yarn:lint:*",
"lint:src": "eslint src --ext .ts --config ../../.eslintrc",
"lint:types": "tsc --noEmit",
"test": "jest",
"test:coverage": "yarn test --coverage",
"pub:test": "yarn publish --access public"
},
"files": [
"*.js",
"*.d.ts",
"dist"
],
"keywords": [
"data structure",
"dag",
"graph",
"typescript"
],
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"gitHead": "50e90c77fd88e44870b36e675875bbfa42c8811e"
}
# This library implements a Direct Acyclic Graph (DAG) in TypeScript.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc