pipeliner 0.2.2
pipeliner: ^0.2.2 copied to clipboard
Effortlessly build and manage pipelines in Dart. Perfect for handling sequences of tasks or transforming data step-by-step.
Effortlessly build and manage pipelines in Dart. Perfect for handling sequences of tasks or transforming data step-by-step.
Table of contents #
Compatibility #
Pipeliner requires Dart SDK
version 3.0.0 or later
.
Installation #
-
Add the package to your project by running:
dart pub add pipeliner
-
Import the package in your Dart file:
import 'package:pipeliner/pipeliner.dart';
Usage #
Api reference #
The documentation is available at: API Reference
Example #
The Pipeliner package allows you to create pipelines where each step processes input and produces output.
Here’s a quick example:
final pipeline = Pipeliner.create(() {
return 1;
})
.pipe((int value) {
return (value + 1).toString();
})
.pipe((String value) {
return int.parse(value) + 1;
});
final result = await pipeline.call();
print('Pipeline result: $result'); // Pipeline result: 3
Adding steps to the pipeline #
Use the pipe
method to add processing steps:
Pipeliner.create(() => 0)
.pipe((input) => input + 1)
.pipe((input) => input * 2);
Each step can process data synchronously or asynchronously.
Running the pipeline #
To execute the pipeline, call its call
method:
final result = await pipeline.call();
print('Pipeline result: $result');
Changelog #
For a full list of changes and updates, see the CHANGELOG.md.
Issues #
If you encounter any issues or have suggestions for improvements, please create an issue on GitHub.
When reporting a bug or requesting a fix, please provide as much detail as possible to help understand the problem or idea.
Including the following information is highly appreciated:
- Steps to reproduce the issue
- Expected behavior
- Any error messages or logs
- Your environment (operating system, Dart version, etc.)
Your feedback is valuable and will help improve the package!
Contributing #
Contributions are welcome!
Please fork this repository and submit pull requests.
License #
This project is licensed under the BSD-3-Clause License.