Flodash

Pub GitHub license

This library is a dart implementation of the popular JavaScript library lodash. It is a collection of utility functions that make it easier to work with collections, objects, numbers, strings, etc.

While this library exposes almost all the functionality of lodash, it is not an exact match. Some functions have been omitted because they are not applicable to dart and some functions have been marked as deprecated because their functionality is already provided by dart itself. For a complete list of the functions that have been omitted, please refer to the omitted functions section.

Usage

A simple usage example:

import 'package:flodash/flodash.dart' as flodash;

main() {
  List<int> list = [1, [2, 3]];
  print(flodash.flatten(list)); // [1, 2, 3]
}

Contributing

If you want to contribute to this project, please read the contributing guidelines.


License

This project is licensed under the MIT License - see the LICENSE file for details


Omitted functions

The following functions have been omitted because they are not applicable to dart:

  • Array

    • differenceBy
    • intersectionBy
    • pull
    • pullAll
    • pullAllBy
    • pullAllWith
    • pullAt
    • unionBy
    • unzipWith
    • xorBy
    • zipWith
  • Collection

    • invokeMap

Libraries

_utils/_array
_utils/_general
_utils/_varargs
flodash
modules/array/chunk
modules/array/compact
modules/array/concat
modules/array/difference
modules/array/difference_with
modules/array/drop
modules/array/drop_right
modules/array/drop_right_while
modules/array/drop_while
modules/array/fill
modules/array/find_index
modules/array/find_last_index
modules/array/first
modules/array/flatten
modules/array/flatten_deep
modules/array/flatten_depth
modules/array/from_pairs
modules/array/index_of
modules/array/initial
modules/array/intersection
modules/array/intersection_with
modules/array/join
modules/array/last
modules/array/last_index_of
modules/array/main
modules/array/nth
modules/array/remove
modules/array/reverse
modules/array/slice
modules/array/sorted_index
modules/array/sorted_uniq
modules/array/sorted_uniq_by
modules/array/tail
modules/array/take
modules/array/take_right
modules/array/take_while
modules/array/union
modules/array/union_with
modules/array/uniq
modules/array/unzip
modules/array/without
modules/array/xor
modules/array/zip
modules/array/zip_object
modules/array/zip_object_deep
modules/collection/count_by
modules/collection/each
modules/collection/every
modules/collection/filter
modules/collection/find
modules/collection/find_last
modules/collection/flat_map
modules/collection/flat_map_deep
modules/collection/flat_map_depth
modules/collection/group_by
modules/collection/includes
modules/collection/key_by
modules/collection/main
modules/collection/map
modules/collection/order_by
modules/collection/partition
modules/collection/reduce
modules/collection/reject
modules/collection/sample
modules/collection/sample_size
modules/collection/shuffle
modules/collection/size
modules/collection/sort_by
modules/date/main
modules/date/now
modules/function/main
modules/lang/cast_array
modules/lang/conforms_to
modules/lang/eq
modules/lang/gt
modules/lang/gte
modules/lang/is_array
modules/lang/is_boolean
modules/lang/is_equal
modules/lang/is_error
modules/lang/is_falsy
modules/lang/is_integer
modules/lang/is_map
modules/lang/is_nan
modules/lang/is_not_null
modules/lang/is_null
modules/lang/is_string
modules/lang/is_truthy
modules/lang/lt
modules/lang/lte
modules/lang/main
modules/lang/ne
modules/lang/to_array
modules/lang/to_string
modules/math/main
modules/methods/main
modules/number/clamp
modules/number/in_range
modules/number/main
modules/number/random
modules/object/main
modules/properties/main
modules/seq/main
modules/string/_helpers/main
modules/string/camelcase
modules/string/capitalize
modules/string/deburr
modules/string/kebabcase
modules/string/lower_first
modules/string/lowercase
modules/string/main
modules/string/replace
modules/string/starts_with
modules/string/to_lower
modules/string/to_upper
modules/string/trim_end
modules/string/trim_start
modules/string/unescape
modules/string/upper_first
modules/string/uppercase
modules/string/words
modules/util/main