discontinuedPackage recollect_core has been discontinued.

recollect_core

The pure-Dart core of recollect. No Flutter dependency, so it works in CLIs, servers and any Dart app.

Flutter apps should use recollect, which re-exports everything here.

What's inside

  • String helpers: Strings, and extensions like toCamelCase(), toSnakeCase(), abbreviate()
  • Number helpers: validate(), isBetween(), readable(), durations (5.seconds), month and weekday names
  • Radix and Bases for converting between bases 2–256 (255.hex, 42.bin)
  • Moment and Period for dates, formatting and "3 hours ago" strings
  • SystemFonts for finding fonts installed on the system
  • parseAnsiSegments() and stripAnsi() for terminal escape codes

Usage

import 'package:recollect_core/recollect_core.dart';

void main() {
  print(255.hex);                       // FF
  print('dart_vm'.toCamelCase());       // DartVm
  print(1234567.readable());            // 1,234,567
  print(Moment.now().timeAgo());        // 0 seconds ago
  print(stripAnsi('\x1B[31mError\x1B[0m')); // Error
}

Libraries

recollect_core