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