safe_lodash 0.0.2 copy "safe_lodash: ^0.0.2" to clipboard
safe_lodash: ^0.0.2 copied to clipboard

A modern Dart utility library delivering modularity, performance, & extras

Safe Lodash #

Safe Lodash is a Dart utility library inspired by JavaScript Lodash. It aims to provide a variety of helpful functions to make working with and manipulating data in Dart easier.

Installation #

Add the following dependency to your Dart project's pubspec.yaml file:

dependencies:
  safe_lodash: ^0.0.1

Run pub get to install the dependency.

Usage #

import 'package:safe_lodash/safe_lodash.dart';

void main() {
	// Example usage
	final list = [1, 2, 3, 4, 5];

	// Use the chunk function to split the list into chunks
	final chunkedLists = chunk(list, 2);
	print(chunkedLists); // Output: [[1, 2], [3, 4], [5]]

	// Use the slice function to get a subset of the list
	final slicedList = slice(list, 1, 3);
	print(slicedList); // Output: [2, 3]
}

Functionality #

Dart Lodash provides a variety of utility functions, including but not limited to:

  • chunk: Splitting a list into chunks
  • slice: Getting a subset of a list
0
likes
120
pub points
0%
popularity

Publisher

unverified uploader

A modern Dart utility library delivering modularity, performance, & extras

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

More

Packages that depend on safe_lodash