nc-photos/app/lib/object_extension.dart

10 lines
272 B
Dart
Raw Permalink Normal View History

2023-10-03 16:28:35 +02:00
import 'package:np_common/object_util.dart';
extension ObjectExtension<T> on T {
2023-10-03 16:28:35 +02:00
/// Deprecated, use [let]
U run<U>(U Function(T obj) fn) => let(fn);
2021-04-16 18:54:02 +02:00
/// Return if this is contained inside [iterable]
bool isIn(Iterable<T> iterable) => iterable.contains(this);
}