flodash
library
Functions
camelCase (String string )
→ String
Converts string
to camel case .
capitalize (String string )
→ String
Converts the first character of String
to upper case and the remaining to lower case.
castArray (dynamic a )
→ List
chunk <T > (List <T > list , {int size = 1 })
→ List <List <T > >
Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.
clamp (num number , num ? lower , [num ? upper ])
→ dynamic
Clamps number within the inclusive lower and upper bounds.
compact <T > (List <T > list )
→ List <T >
Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey.
conformsTo (dynamic object , dynamic source )
→ bool
countBy (List list , dynamic iteratee )
→ Map
deburr (String str )
→ String
Deburrs String
by converting Latin-1 Supplement and Latin Extended-A letters to basic Latin letters and removing combining diacritical marks .
drop (List list , {int n = 1 })
→ List
dropRight (List list , {int n = 1 })
→ List
dropRightWhile (List list , dynamic predicate )
→ List
dropWhile (List list , dynamic predicate )
→ List
each (dynamic collection , Function iteratee )
→ void
eachRight (dynamic collection , Function iteratee )
→ void
eq (dynamic a , dynamic b )
→ bool
every (dynamic collection , dynamic iteratee )
→ bool
fill (List list , dynamic value , {int start = 0 , dynamic end })
→ List
filter (List list , dynamic iteratee )
→ List
find <T > (List <T? > list , dynamic iteratee )
→ T?
Iterates over elements of collection, returning the first element predicate returns truthy for. The predicate is invoked with the value of the current item.
Arguments
findIndex (List list , dynamic predicate , {int fromIndex = 0 })
→ int
findLast (List list , dynamic iteratee )
→ dynamic
findLastIndex (List list , dynamic predicate , {dynamic fromIndex })
→ int
first (List list )
→ dynamic
flatMap (List list , dynamic iteratee )
→ List
flatMapDeep (List list , dynamic iteratee )
→ List
flatMapDepth (List list , dynamic iteratee , {int depth = 1 })
→ List
flatten (Iterable list )
→ List
flattenDeep (Iterable list )
→ List
flattenDepth (Iterable list , {int depth = 1 })
→ List
fromPairs (List list )
→ Map
groupBy (List list , dynamic iteratee )
→ Map
gt (dynamic a , dynamic b )
→ bool
gte (dynamic a , dynamic b )
→ bool
head (List list )
→ dynamic
includes (dynamic collection , dynamic value , {int fromIndex = 0 })
→ bool
indexOf (List list , dynamic value , {int fromIndex = 0 })
→ int
initial (List list )
→ List
isArray (dynamic obj )
→ bool
isBoolean (dynamic obj )
→ bool
isEqual (dynamic a , dynamic b )
→ bool
isError (dynamic object )
→ bool
isFalsy (dynamic v )
→ bool
isInteger (dynamic object )
→ bool
isMap (dynamic value )
→ bool
isNaN (dynamic value )
→ bool
isNotNull (dynamic v )
→ bool
isNull (dynamic v )
→ bool
isString (dynamic object )
→ bool
isTruthy (dynamic v )
→ bool
join (List list , [String separator = ',' ])
→ String
kebabCase (String string )
→ String
Converts String
to kebab case .
keyBy (List list , dynamic iteratee )
→ Map
last (List list )
→ dynamic
lastIndexOf (List list , dynamic value , {dynamic fromIndex })
→ int
lowerCase (String string )
→ String
Converts String
, as space separated words, to lower case.
lowerFirst (String string )
→ String
Converts the first character of string
to lower case.
lt (dynamic a , dynamic b )
→ bool
lte (dynamic a , dynamic b )
→ bool
map (List list , dynamic iteratee )
→ List
ne (dynamic a , dynamic b )
→ bool
now ()
→ int
Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC).
nth (List list , {int n = 0 })
→ dynamic
orderBy (List list , List iteratees , [dynamic orders ])
→ List
partition (dynamic list , dynamic iteratee )
→ List
random (num upper , {num ? lower , bool floating = false })
→ dynamic
reduce (List list , dynamic iteratee , [dynamic accumulator ])
→ dynamic
reduceRight (List list , dynamic iteratee , [dynamic accumulator ])
→ dynamic
reject (List list , dynamic iteratee )
→ List
remove (List list , dynamic predicate )
→ List
replace (String string , dynamic pattern , dynamic replacement )
→ String
Replaces occurrences of pattern in string with replacement.
Returns the modified string.
reverse (List list )
→ List
sample (dynamic collection )
→ dynamic
sampleSize (dynamic collection , {int n = 1 })
→ List
shuffle (List collection )
→ List
size (dynamic collection )
→ int
slice (List list , {int start = 0 , dynamic end })
→ List
some (dynamic collection , dynamic iteratee )
→ bool
sortBy (List list , dynamic iteratees )
→ List
sortedIndex (List list , dynamic value )
→ int
sortedIndexBy (List list , dynamic value , dynamic iteratee )
→ int
sortedLastIndex (List list , dynamic value )
→ int
sortedLastIndexBy (List list , dynamic value , dynamic iteratee )
→ int
sortedLastIndexOf (List list , dynamic value )
→ int
sortedUniq (List list )
→ List
sortedUniqBy (List list , Function iteratee )
→ List
startsWith (String string , String target , [int position = 0 ])
→ bool
Checks if string starts with the given target string.
tail (List list )
→ List
take (List list , {int n = 1 })
→ List
takeRight (List list , {int n = 1 })
→ List
takeRightWhile (List list , dynamic predicate )
→ List
toArray (dynamic obj )
→ List
toLower ([String string = '' ])
→ String
Converts a string, as a whole, to lowercase.
toString (dynamic value )
→ String
toUpper ([String string = '' ])
→ String
Converts a string, as a whole, to uppercase.
trimEnd (String str , [String chars = ' ' ])
→ String
Removes trailing whitespace or specified characters from string.
trimStart (String string , [String chars = ' ' ])
→ String
Removes leading whitespace or specified characters from string.
unescape ([String string = '' ])
→ String
The inverse of _.escape; this method converts the HTML entities &, <, >, ", and ' in string to their corresponding characters
uniq (List list )
→ List
uniqBy (List list , dynamic iteratee )
→ List
unzip (List list )
→ List
upperCase ([String string = '' ])
→ String
Converts string, as space separated words, to upper case.
upperFirst ([String string = '' ])
→ String
words ({required String string , RegExp ? pattern , bool guard = false })
→ List <String >
Splits String
into an array of its words.
zipObject (List list , List values )
→ Map
zipObjectDeep (List list , List values )
→ Map