Skip to content
This repository was archived by the owner on May 6, 2023. It is now read-only.

Commit 64eb251

Browse files
committed
Rename package and update readme.
1 parent af26e0c commit 64eb251

2 files changed

Lines changed: 37 additions & 4 deletions

File tree

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
# node-task-pool
1+
# node-task-pool
2+
3+
[![Latest version](https://img.shields.io/github/v/release/ghosind/node-task-pool?include_prereleases)](https://github.com/ghosind/node-task-pool)
4+
[![NPM](https://img.shields.io/npm/v/@antmind/task-pool)](https://www.npmjs.com/package/@antmind/task-pool)
5+
[![Github Actions build](https://img.shields.io/github/workflow/status/ghosind/node-task-pool/Node.js%20CI)](https://github.com/ghosind/node-task-pool)
6+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b00f10bfb94641eea45837c973c2f86b)](https://www.codacy.com/gh/ghosind/node-task-pool/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ghosind/node-task-pool&utm_campaign=Badge_Grade)
7+
[![codecov](https://codecov.io/gh/ghosind/node-task-pool/branch/main/graph/badge.svg?token=UZ7SOSC9RH)](https://codecov.io/gh/ghosind/node-task-pool)
8+
[![License](https://img.shields.io/github/license/ghosind/node-task-pool)](https://github.com/ghosind/node-task-pool)
9+
10+
`@antmind/task-pool` is a simple Node.js functional tasks pool implementation, supported both synchronous and asynchronous functions.
11+
12+
## Installation
13+
14+
Using NPM:
15+
16+
```sh
17+
npm install --save @antmind/task-pool
18+
```
19+
20+
## Getting Start
21+
22+
```ts
23+
import { Task, TaskPool } from '@antmind/task-pool';
24+
25+
const pool = new TaskPool({ size: 5 });
26+
pool.addTask(new Task((val: any) -> { console.log('hello', val) }, 'world'));
27+
28+
pool.exec();
29+
```

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "task-pool",
2+
"name": "@antmind/task-pool",
33
"version": "0.0.1",
4-
"description": "A simple Node.js functional task pool implementation, supported both synchronous and asynchronous functions.",
4+
"description": "A simple Node.js functional tasks pool implementation, supported both synchronous and asynchronous functions.",
55
"main": "./lib/index.js",
66
"scripts": {
77
"build": "tsc",
@@ -40,5 +40,10 @@
4040
"nyc": "^15.1.0",
4141
"ts-node": "^9.1.1",
4242
"typescript": "^4.1.3"
43-
}
43+
},
44+
"directories": {
45+
"lib": "lib",
46+
"test": "test"
47+
},
48+
"dependencies": {}
4449
}

0 commit comments

Comments
 (0)