
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-taskflow
Advanced tools
A simple task flow execution framework based on conditions.
npm i node-taskflow
Define your task function in separate files. For example, create a file named task1.js:
// test.js in root directory
export default function Task1(data) {
console.log('Executing Task1 with data:', data);
}
// or extend base class to create task
import {BaseTask} from '../index';
export class MyTask extends BaseTask {
condition(inputData: any): boolean {
return inputData.someCondition; // Custom condition for the class
}
async execute(inputData: any): Promise<any> {
console.log('Custom task execution with data:', inputData); // Custom task execution logic
}
}
Define your task conditions in a yml file for function based task and for class based task we can define in class function only no need to define in yaml:
# test.yml in root directory for function based
settings:
- logLevel: info
tasks:
- name: Task1
function: 'test.js'
conditions:
- type: 'gt'
property: 'dataValue'
threshold: 150
# test.yml in root directory for class based
settings:
- logLevel: info
tasks:
- name: Task1
function: 'test.js'
Run the executor:
// test.ts
import { TaskFlow } from "node-taskflow";
TaskFlow.configure('./test.yml').then(() => {
const inputData = {dataValue: 300};
TaskFlow.execute(inputData);
});
// or
await TaskFlow.configure('./test.yml')
const inputData = {dataValue: 300};
TaskFlow.execute(inputData);
The executor will read the configuration from tasks-config.yml, execute the matching task based on conditions, and log the result.
git clone https://github.com/vectoscalar/node-taskflow
cd node-taskflow
npm install
npm run test
Pending
FAQs
A simple task execution framework with conditions
We found that node-taskflow demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.