Effortlessly build and manage pipelines in Dart. Perfect for handling sequences of tasks or transforming data step-by-step.
Pipeliner requires Dart SDK version 3.0.0 or later.
-
Add the package to your project by running:
dart pub add pipeliner
-
Import the package in your Dart file:
import 'package:pipeliner/pipeliner.dart';
The documentation is available at: API Reference
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: 3Use 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.
To execute the pipeline, call its call method:
final result = await pipeline.call();
print('Pipeline result: $result');For a full list of changes and updates, see the CHANGELOG.md.
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!
Contributions are welcome!
Please fork this repository and submit pull requests.
By participating in this project, you agree to abide by our Code of Conduct.
This project is licensed under the BSD-3-Clause License.