How to use the dependency-graph.DepGraph.prototype function in dependency-graph

To help you get started, we’ve selected a few dependency-graph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jsdoc / jsdoc / packages / jsdoc-task-runner / lib / task-runner.js View on Github external
const _ = require('lodash');
const { DepGraph } = require('dependency-graph');
const Emittery = require('emittery');
const ow = require('ow');
const Queue = require('p-queue').default;
const v = require('./validators');

// Work around an annoying typo in a method name.
DepGraph.prototype.dependentsOf = DepGraph.prototype.dependantsOf;

module.exports = class TaskRunner extends Emittery {
    constructor(context) {
        super();

        ow(context, ow.optional.object);

        this._init(context);
    }

    _addOrRemoveTasks(tasks, func, action) {
        func = _.bind(func, this);

        if (Array.isArray(tasks)) {
            tasks.forEach((task, i) => {
                try {

dependency-graph

Simple dependency graph.

MIT
Latest version published 5 months ago

Package Health Score

74 / 100
Full package analysis