https://github.com/bitinfinitywebsolutions/underscore
Underscore is a dart utility library for efficient Flutter development.
https://github.com/bitinfinitywebsolutions/underscore
flutter library package underscore utility
Last synced: 23 days ago
JSON representation
Underscore is a dart utility library for efficient Flutter development.
- Host: GitHub
- URL: https://github.com/bitinfinitywebsolutions/underscore
- Owner: bitinfinitywebsolutions
- License: mit
- Created: 2024-06-09T04:44:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T10:21:24.000Z (almost 2 years ago)
- Last Synced: 2024-08-22T22:43:09.355Z (over 1 year ago)
- Topics: flutter, library, package, underscore, utility
- Language: Dart
- Homepage: https://pub.dev/packages/underscore
- Size: 101 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Underscore
[](https://pub.dartlang.org/packages/underscore)
[](https://pub.dev/packages/underscore/score)
[](https://pub.dev/packages/underscore/score)
[](https://github.com/bitinfinitywebsolutions/underscore/blob/master/LICENSE)
Underscore is a dart utility library for efficient Flutter development.
Underscore offers a versatile collection of over 100 functions tailored for everyday functional
needs such as mapping, filtering, and invoking, alongside specialized tools like function binding,
dart templating, rapid index creation, and comprehensive deep equality testing.
## How to use
#### 1. Depend on it
Add this to your package's pubspec.yaml file:
```
dependencies:
underscore: ^0.0.5
```
#### 2. Install it
You can install packages from the command line:
with Flutter:
```
$ flutter pub add underscore
```
Alternatively, your editor might support `flutter packages get`. Check the docs for your editor to
learn more.
#### 3. Import it
Now in your Dart code, you can use:
```dart
import 'package:underscore/underscore.dart' as _;
```
#### 4. Use it
Now in your Dart code, you can use:
```dart
var users = [
{ 'user': 'barney', 'age': 36, 'active': true},
{ 'user': 'fred', 'age': 40, 'active': false}
];
print
(
_.filter(users, (o) => !(o['active'])));
// output: { 'user': 'fred', 'age': 40, 'active': false }
```