pipe 1.0.1 copy "pipe: ^1.0.1" to clipboard
pipe: ^1.0.1 copied to clipboard

outdated

A starting point for Dart libraries or applications.

example/pipe_example.dart

import 'package:pipe/pipe.dart';

void main() {
  /// `String`:
  'Hello' | print; // Hello
  'Hello' | (s) => '$s, man!' | print; // Hello, man!

  /// `List`:
  [1, 2, 3] | print; // [1, 2, 3]

  /// `Map` and `Set` literals may produce syntax error:
  /// {'a':123} | print; // syntax error
  /// {1,2,3} | print; // syntax error
  /// Use variables in this case:

  var m = {'a': 123};
  m | print; // {a: 123}

  var s = {1, 2, 3};
  s | print; // {1, 2, 3}
}
5
likes
0
pub points
22%
popularity

Publisher

unverified uploader

A starting point for Dart libraries or applications.

Homepage

License

unknown (LICENSE)

More

Packages that depend on pipe