BlogDocs

feat: add `mapify` function(#58)

Comparing
cimbraien:feat/array/mapify
(
b5c7777
) with
main
(
e2c2ce3
)
-14%
IMPROVEMENTS
2
REGRESSIONS
2
UNTOUCHED
187
NEW
2
DROPPED
0
IGNORED
0

Benchmarks

Failed

with empty input listRegression
benchmarks/array/select.bench.ts::select::with empty input list
-14%
18.2 µs
21 µs
with integerRegression
benchmarks/typed/isFloat.bench.ts::isFloat::with integer
-13%
19.7 µs
22.5 µs

Improved

with primitive
benchmarks/typed/isPrimitive.bench.ts::isPrimitive::with primitive
+21%
17.8 µs
14.8 µs
with mixed arrays
benchmarks/array/intersects.bench.ts::intersects::with mixed arrays
+15%
25.5 µs
22.2 µs

New

with empty list
benchmarks/array/mapify.bench.ts::mapify::with empty list
N/A
N/A
18.4 µs
with full list and identity value function
benchmarks/array/mapify.bench.ts::mapify::with full list and identity value function
N/A
N/A
56.9 µs

Passed

with full list and identity value function
benchmarks/array/objectify.bench.ts::objectify::with full list and identity value function
+6%
60.2 µs
57 µs
with item that does exist and custom matcher
benchmarks/array/toggle.bench.ts::toggle::with item that does exist and custom matcher
+2%
46.5 µs
45.5 µs
with special characters
benchmarks/random/uid.bench.ts::uid::with special characters
+2%
40.8 µs
40 µs
with string fill
benchmarks/array/list.bench.ts::list::with string fill
+2%
43.9 µs
43.1 µs
with numbers and special characters (no split on number)
benchmarks/string/snake.bench.ts::snake::with numbers and special characters (no split on number)
+1%
59.3 µs
58.5 µs
with non-empty input list
benchmarks/array/select.bench.ts::select::with non-empty input list
+1%
52.9 µs
52.2 µs
with index
benchmarks/array/select.bench.ts::select::with index
+1%
41 µs
40.5 µs
with null
benchmarks/typed/isEmpty.bench.ts::isEmpty::with null
+1%
14.7 µs
14.5 µs
with anonymous function
benchmarks/typed/isFunction.bench.ts::isFunction::with anonymous function
+1%
15.2 µs
15 µs
with non-empty array
benchmarks/array/unique.bench.ts::unique::with non-empty array
+1%
23.2 µs
23 µs
with undefined
benchmarks/number/toInt.bench.ts::toInt::with undefined
+1%
14.7 µs
14.5 µs
with valid input
benchmarks/object/crush.bench.ts::crush::with valid input
+1%
192.6 µs
190.9 µs
with item that does not exist
benchmarks/array/toggle.bench.ts::toggle::with item that does not exist
+1%
27.5 µs
27.2 µs
with valid input
benchmarks/object/mapValues.bench.ts::mapValues::with valid input
+1%
34.6 µs
34.3 µs
with non-number value
benchmarks/typed/isFloat.bench.ts::isFloat::with non-number value
+1%
19.7 µs
19.6 µs
with array index path
benchmarks/object/set.bench.ts::set::with array index path
+1%
101.1 µs
100.2 µs
with null
benchmarks/typed/isPrimitive.bench.ts::isPrimitive::with null
+1%
14.7 µs
14.6 µs
with null
benchmarks/typed/isPlainObject.bench.ts::isPlainObject::with null
+1%
15 µs
14.9 µs
with non-Date value
benchmarks/typed/isDate.bench.ts::isDate::with non-Date value
+1%
19.5 µs
19.3 µs
with non-empty arrays
benchmarks/array/zipToObject.bench.ts::zipToObject::with non-empty arrays
+1%
27.1 µs
26.9 µs
with Promise-like
benchmarks/typed/isPromise.bench.ts::isPromise::with Promise-like
+1%
28.2 µs
28 µs
with item that does not exist and custom matcher
benchmarks/array/toggle.bench.ts::toggle::with item that does not exist and custom matcher
+1%
36.7 µs
36.5 µs
with list of numbers
benchmarks/array/min.bench.ts::min::with list of numbers
+1%
28.7 µs
28.5 µs
max of two items
benchmarks/series/series.bench.ts::series::max method::max of two items
+1%
13 µs
13 µs
min of two items
benchmarks/series/series.bench.ts::series::min method::min of two items
+1%
18.2 µs
18 µs
with valid input
benchmarks/random/shuffle.bench.ts::shuffle::with valid input
+1%
220.7 µs
219.3 µs
with null
benchmarks/typed/isFunction.bench.ts::isFunction::with null
+1%
14.6 µs
14.5 µs
with empty keys
benchmarks/object/pick.bench.ts::pick::with empty keys
+1%
25 µs
24.9 µs
with invalid input
benchmarks/typed/isDate.bench.ts::isDate::with invalid input
+1%
25.6 µs
25.4 µs
with valid input
benchmarks/random/random.bench.ts::random::with valid input
+1%
20.3 µs
20.2 µs
with descending order
benchmarks/array/alphabetical.bench.ts::alphabetical::with descending order
+1%
52 µs
51.7 µs
with simple path
benchmarks/object/get.bench.ts::get::with simple path
+1%
124.9 µs
124.2 µs
with empty object
benchmarks/object/invert.bench.ts::invert::with empty object
+1%
21 µs
20.9 µs
with function fill
benchmarks/array/list.bench.ts::list::with function fill
+1%
41.7 µs
41.5 µs
spin by zero
benchmarks/series/series.bench.ts::series::spin method::spin by zero
+1%
11.4 µs
11.3 µs
with non-Promise
benchmarks/typed/isPromise.bench.ts::isPromise::with non-Promise
+1%
28 µs
27.8 µs
with non-empty object
benchmarks/object/invert.bench.ts::invert::with non-empty object
+1%
33.3 µs
33.2 µs
with simple path
benchmarks/object/set.bench.ts::set::with simple path
+1%
40.5 µs
40.3 µs
with two empty array inputs
benchmarks/array/merge.bench.ts::merge::with two empty array inputs
0%
18.1 µs
18 µs
with item at end
benchmarks/array/replaceOrAppend.bench.ts::replaceOrAppend::with item at end
0%
31 µs
30.9 µs
with valid input
benchmarks/typed/isDate.bench.ts::isDate::with valid input
0%
24.5 µs
24.4 µs
with string
benchmarks/number/toInt.bench.ts::toInt::with string
0%
18.8 µs
18.7 µs
with item at start
benchmarks/array/replaceOrAppend.bench.ts::replaceOrAppend::with item at start
0%
31.9 µs
31.8 µs
append item
benchmarks/array/replaceOrAppend.bench.ts::replaceOrAppend::append item
0%
27.3 µs
27.2 µs
with item that does exist
benchmarks/array/toggle.bench.ts::toggle::with item that does exist
0%
29.3 µs
29.2 µs
with strategy prepend
benchmarks/array/toggle.bench.ts::toggle::with strategy prepend
0%
45.9 µs
45.7 µs
with valid input
benchmarks/string/title.bench.ts::title::with valid input
0%
48.7 µs
48.6 µs
with empty array
benchmarks/array/shift.bench.ts::shift::with empty array
0%
15.3 µs
15.3 µs
with valid input
benchmarks/object/lowerize.bench.ts::lowerize::with valid input
0%
38.9 µs
38.8 µs
with default step
benchmarks/array/range.bench.ts::range::with default step
0%
16.8 µs
16.8 µs
with ascending order
benchmarks/array/sort.bench.ts::sort::with ascending order
0%
46.6 µs
46.5 µs
with Object.create(null)
benchmarks/typed/isPlainObject.bench.ts::isPlainObject::with Object.create(null)
0%
21.5 µs
21.4 µs
with valid input
benchmarks/random/uid.bench.ts::uid::with valid input
0%
45.4 µs
45.2 µs
with non-empty array
benchmarks/array/shift.bench.ts::shift::with non-empty array
0%
30.7 µs
30.6 µs
with namespace object
benchmarks/typed/isPlainObject.bench.ts::isPlainObject::with namespace object
0%
21.3 µs
21.2 µs
with float
benchmarks/typed/isFloat.bench.ts::isFloat::with float
0%
29.2 µs
29.1 µs
with two special characters
benchmarks/string/trim.bench.ts::trim::with two special characters
0%
41 µs
40.9 µs
with decimal string
benchmarks/typed/isIntString.bench.ts::isIntString::with decimal string
0%
22.2 µs
22.1 µs
get last item
benchmarks/series/series.bench.ts::series::last method::get last item
0%
11.7 µs
11.7 µs
with list of objects
benchmarks/array/min.bench.ts::min::with list of objects
0%
48.6 µs
48.5 µs
with valid input
benchmarks/random/draw.bench.ts::draw::with valid input
0%
24.7 µs
24.6 µs
spin by positive number
benchmarks/series/series.bench.ts::series::spin method::spin by positive number
0%
45.8 µs
45.7 µs
with ascending order
benchmarks/array/alphabetical.bench.ts::alphabetical::with ascending order
0%
52.1 µs
52 µs
with valid input
benchmarks/array/last.bench.ts::last::with valid input
0%
27.3 µs
27.2 µs
with default step
benchmarks/array/list.bench.ts::list::with default step
0%
42 µs
41.9 µs
with non-empty array
benchmarks/array/sift.bench.ts::sift::with non-empty array
0%
28.1 µs
28.1 µs
with arrow function
benchmarks/typed/isFunction.bench.ts::isFunction::with arrow function
0%
15.2 µs
15.2 µs
with null
benchmarks/typed/isSymbol.bench.ts::isSymbol::with null
0%
14.7 µs
14.7 µs
with empty list
benchmarks/array/last.bench.ts::last::with empty list
0%
15.6 µs
15.5 µs
with filter callback
benchmarks/object/filterKey.bench.ts::filterKey::with filter callback
0%
34.6 µs
34.5 µs
with numbers
benchmarks/typed/isEqual.bench.ts::isEqual::with numbers
0%
119.9 µs
119.7 µs
with only one value
benchmarks/array/zipToObject.bench.ts::zipToObject::with only one value
0%
37.6 µs
37.6 µs
with key not in object
benchmarks/object/pick.bench.ts::pick::with key not in object
0%
32 µs
31.9 µs
with valid input
benchmarks/object/mapEntries.bench.ts::mapEntries::with valid input
0%
51.8 µs
51.7 µs
spin by negative number
benchmarks/series/series.bench.ts::series::spin method::spin by negative number
0%
206.5 µs
206.2 µs
with empty list
benchmarks/array/objectify.bench.ts::objectify::with empty list
0%
18.3 µs
18.3 µs
with valid input
benchmarks/object/mapKeys.bench.ts::mapKeys::with valid input
0%
36.4 µs
36.4 µs
to default precision (0 decimal places)
benchmarks/number/round.bench.ts::round::to default precision (0 decimal places)
0%
19 µs
18.9 µs
with empty object
benchmarks/typed/isSymbol.bench.ts::isSymbol::with empty object
0%
18.7 µs
18.6 µs
with undefined
benchmarks/number/toFloat.bench.ts::toFloat::with undefined
0%
14.6 µs
14.6 µs
with non-empty range
benchmarks/number/inRange.bench.ts::inRange::with non-empty range
0%
20.3 µs
20.2 µs
with integer string
benchmarks/typed/isIntString.bench.ts::isIntString::with integer string
0%
20.4 µs
20.4 µs
with non-primitive
benchmarks/typed/isPrimitive.bench.ts::isPrimitive::with non-primitive
0%
21.5 µs
21.4 µs
with empty object
benchmarks/object/keys.bench.ts::keys::with empty object
0%
29.7 µs
29.7 µs
with filter function input
benchmarks/object/shake.bench.ts::shake::with filter function input
0%
43.6 µs
43.6 µs
with valid input
benchmarks/string/trim.bench.ts::trim::with valid input
0%
40.4 µs
40.3 µs
with empty array
benchmarks/array/fork.bench.ts::fork::with empty array
0%
23.7 µs
23.7 µs
with object fill
benchmarks/array/list.bench.ts::list::with object fill
0%
57.1 µs
57 µs
with null
benchmarks/typed/isNumber.bench.ts::isNumber::with null
0%
18.1 µs
18.1 µs
with array index path
benchmarks/object/get.bench.ts::get::with array index path
0%
231.9 µs
231.7 µs
with valid input
benchmarks/object/upperize.bench.ts::upperize::with valid input
0%
40.9 µs
40.9 µs
with very small numbers close to zero
benchmarks/number/round.bench.ts::round::with very small numbers close to zero
0%
37.9 µs
37.8 µs
with valid input
benchmarks/object/shake.bench.ts::shake::with valid input
0%
54.4 µs
54.4 µs
with one key not in object
benchmarks/object/pick.bench.ts::pick::with one key not in object
0%
34.4 µs
34.4 µs
with array of keys
benchmarks/object/filterKey.bench.ts::filterKey::with array of keys
0%
32 µs
31.9 µs
with no common items
benchmarks/array/intersects.bench.ts::intersects::with no common items
0%
35.5 µs
35.5 µs
with non-numeric string
benchmarks/typed/isIntString.bench.ts::isIntString::with non-numeric string
0%
29.5 µs
29.5 µs
with object
benchmarks/object/clone.bench.ts::clone::with object
0%
42.4 µs
42.4 µs
with default cluster size
benchmarks/array/cluster.bench.ts::cluster::with default cluster size
0%
33.8 µs
33.8 µs
with valid input
benchmarks/object/assign.bench.ts::assign::with valid input
0%
270.6 µs
270.5 µs
with item in middle
benchmarks/array/replaceOrAppend.bench.ts::replaceOrAppend::with item in middle
0%
221 µs
220.9 µs
with non-empty object
benchmarks/object/keys.bench.ts::keys::with non-empty object
0%
112.7 µs
112.7 µs
with object arrays
benchmarks/array/intersects.bench.ts::intersects::with object arrays
0%
54.2 µs
54.2 µs
with class instance
benchmarks/object/filterKey.bench.ts::filterKey::with class instance
0%
63 µs
63 µs
with undefined new item
benchmarks/array/replace.bench.ts::replace::with undefined new item
0%
18.2 µs
18.2 µs
get next item
benchmarks/series/series.bench.ts::series::next method::get next item
0%
12.7 µs
12.7 µs
get previous item
benchmarks/series/series.bench.ts::series::previous method::get previous item
0%
12.6 µs
12.6 µs
with named function
benchmarks/typed/isFunction.bench.ts::isFunction::with named function
0%
15.1 µs
15.1 µs
with null
benchmarks/typed/isObject.bench.ts::isObject::with null
0%
14.7 µs
14.7 µs
with custom step
benchmarks/array/range.bench.ts::range::with custom step
0%
16.8 µs
16.8 µs
with strings
benchmarks/typed/isEqual.bench.ts::isEqual::with strings
0%
126.8 µs
126.8 µs
with Promise
benchmarks/typed/isPromise.bench.ts::isPromise::with Promise
0%
22.5 µs
22.5 µs
with list of numbers
benchmarks/array/sum.bench.ts::sum::with list of numbers
0%
20.9 µs
20.9 µs
with specific keys
benchmarks/object/omit.bench.ts::omit::with specific keys
0%
29.7 µs
29.7 µs
with object literal
benchmarks/typed/isObject.bench.ts::isObject::with object literal
0%
18.6 µs
18.6 µs
with entirely different arrays
benchmarks/array/diff.bench.ts::diff::with entirely different arrays
0%
34.1 µs
34.1 µs
with valid input
benchmarks/string/dash.bench.ts::dash::with valid input
0%
39 µs
39 µs
with arrays
benchmarks/typed/isEqual.bench.ts::isEqual::with arrays
0%
129 µs
129 µs
with valid input
benchmarks/string/snake.bench.ts::snake::with valid input
0%
116 µs
116.1 µs
with string
benchmarks/number/toFloat.bench.ts::toFloat::with string
0%
20 µs
20 µs
with complex inputs
benchmarks/array/merge.bench.ts::merge::with complex inputs
0%
51.7 µs
51.7 µs
with valid input
benchmarks/string/pascal.bench.ts::pascal::with valid input
0%
39.6 µs
39.7 µs
with out-of-bounds precision
benchmarks/number/round.bench.ts::round::with out-of-bounds precision
0%
40.6 µs
40.6 µs
with non-empty array
benchmarks/array/fork.bench.ts::fork::with non-empty array
0%
41.8 µs
41.8 µs
with list of numbers
benchmarks/array/max.bench.ts::max::with list of numbers
0%
28.6 µs
28.7 µs
with non-plain object (arguments)
benchmarks/typed/isPlainObject.bench.ts::isPlainObject::with non-plain object (arguments)
0%
42.8 µs
42.9 µs
with item by index
benchmarks/array/replace.bench.ts::replace::with item by index
0%
32.2 µs
32.3 µs
with non-empty arrays
benchmarks/array/zip.bench.ts::zip::with non-empty arrays
0%
53.2 µs
53.2 µs
with default value
benchmarks/object/get.bench.ts::get::with default value
0%
41.7 µs
41.7 µs
without a condition callback
benchmarks/array/selectFirst.bench.ts::selectFirst::without a condition callback
0%
47.8 µs
47.9 µs
with deep path
benchmarks/object/set.bench.ts::set::with deep path
0%
50 µs
50.1 µs
with descending order
benchmarks/array/sort.bench.ts::sort::with descending order
0%
46.5 µs
46.5 µs
with two params
benchmarks/number/inRange.bench.ts::inRange::with two params
0%
20.2 µs
20.2 µs
with non-empty string
benchmarks/typed/isEmpty.bench.ts::isEmpty::with non-empty string
0%
30.3 µs
30.4 µs
with non-empty array
benchmarks/array/boil.bench.ts::boil::with non-empty array
0%
35 µs
35 µs
with custom value generator
benchmarks/array/range.bench.ts::range::with custom value generator
0%
16.9 µs
17 µs
with valid input
benchmarks/string/camel.bench.ts::camel::with valid input
0%
42.8 µs
42.8 µs
with non-number value
benchmarks/typed/isInt.bench.ts::isInt::with non-number value
0%
29.1 µs
29.2 µs
with non-empty object
benchmarks/typed/isEmpty.bench.ts::isEmpty::with non-empty object
0%
37.7 µs
37.8 µs
with numeric key
benchmarks/object/set.bench.ts::set::with numeric key
0%
51.7 µs
51.9 µs
with item in a list of objects
benchmarks/array/replace.bench.ts::replace::with item in a list of objects
0%
41.4 µs
41.5 µs
with key fn
benchmarks/array/unique.bench.ts::unique::with key fn
0%
235 µs
235.7 µs
with groups by provided attribute
benchmarks/array/group.bench.ts::group::with groups by provided attribute
0%
212.9 µs
213.5 µs
with object
benchmarks/typed/isString.bench.ts::isString::with object
0%
19.2 µs
19.2 µs
with empty string
benchmarks/typed/isEmpty.bench.ts::isEmpty::with empty string
0%
35.6 µs
35.7 µs
with custom step
benchmarks/array/list.bench.ts::list::with custom step
0%
251.7 µs
252.5 µs
specified cluster size of 3
benchmarks/array/cluster.bench.ts::cluster::specified cluster size of 3
0%
33.8 µs
33.9 µs
with list of objects
benchmarks/array/sum.bench.ts::sum::with list of objects
0%
32.7 µs
32.8 µs
with custom map function
benchmarks/array/zipToObject.bench.ts::zipToObject::with custom map function
0%
40.5 µs
40.6 µs
with empty array
benchmarks/array/boil.bench.ts::boil::with empty array
0%
16 µs
16.1 µs
with empty array and a default value
benchmarks/array/first.bench.ts::first::with empty array and a default value
0%
15.6 µs
15.6 µs
without a condition callback
benchmarks/array/select.bench.ts::select::without a condition callback
0%
49.4 µs
49.6 µs
with non-plain object (Date)
benchmarks/typed/isPlainObject.bench.ts::isPlainObject::with non-plain object (Date)
0%
23.8 µs
23.9 µs
with a specified character
benchmarks/string/trim.bench.ts::trim::with a specified character
0%
36.6 µs
36.8 µs
with non-empty input list
benchmarks/array/selectFirst.bench.ts::selectFirst::with non-empty input list
0%
36.9 µs
37 µs
with index
benchmarks/array/selectFirst.bench.ts::selectFirst::with index
0%
29.1 µs
29.2 µs
with list of objects
benchmarks/array/max.bench.ts::max::with list of objects
0%
48.5 µs
48.7 µs
with Symbol instance
benchmarks/typed/isSymbol.bench.ts::isSymbol::with Symbol instance
0%
21 µs
21.1 µs
with empty object
benchmarks/object/listify.bench.ts::listify::with empty object
0%
19.9 µs
20 µs
with number
benchmarks/typed/isString.bench.ts::isString::with number
0%
18.9 µs
19 µs
with valid input
benchmarks/array/iterate.bench.ts::iterate::with valid input
0%
24.2 µs
24.3 µs
with non-empty object
benchmarks/object/listify.bench.ts::listify::with non-empty object
0%
47.6 µs
47.8 µs
with empty keys
benchmarks/object/omit.bench.ts::omit::with empty keys
-1%
15.5 µs
15.6 µs
with non-empty input list
benchmarks/array/flat.bench.ts::flat::with non-empty input list
-1%
26.3 µs
26.5 µs
with integer
benchmarks/typed/isNumber.bench.ts::isNumber::with integer
-1%
17.9 µs
18 µs
with valid input
benchmarks/string/capitalize.bench.ts::capitalize::with valid input
-1%
23.9 µs
24.1 µs
with non-empty array
benchmarks/array/first.bench.ts::first::with non-empty array
-1%
27.1 µs
27.3 µs
with null
benchmarks/typed/isString.bench.ts::isString::with null
-1%
18.9 µs
19 µs
with empty object
benchmarks/typed/isEmpty.bench.ts::isEmpty::with empty object
-1%
44.5 µs
44.8 µs
with string
benchmarks/typed/isString.bench.ts::isString::with string
-1%
14.7 µs
14.8 µs
with valid input
benchmarks/array/counting.bench.ts::counting::with valid input
-1%
37.6 µs
37.9 µs
with objects
benchmarks/typed/isEqual.bench.ts::isEqual::with objects
-1%
110.5 µs
111.4 µs
with non-number
benchmarks/typed/isNumber.bench.ts::isNumber::with non-number
-1%
18.1 µs
18.3 µs
with integer
benchmarks/typed/isInt.bench.ts::isInt::with integer
-1%
19.4 µs
19.6 µs
with empty input list
benchmarks/array/selectFirst.bench.ts::selectFirst::with empty input list
-1%
18 µs
18.2 µs
with class instance
benchmarks/object/clone.bench.ts::clone::with class instance
-1%
66.6 µs
67.3 µs
get first item
benchmarks/series/series.bench.ts::series::first method::get first item
-1%
11.1 µs
11.3 µs
with non-integer
benchmarks/typed/isInt.bench.ts::isInt::with non-integer
-1%
19.8 µs
20 µs
with identity function
benchmarks/array/diff.bench.ts::diff::with identity function
-1%
75.6 µs
76.5 µs
with custom identity function
benchmarks/array/intersects.bench.ts::intersects::with custom identity function
-2%
38.9 µs
39.8 µs
with undefined nested path and default value
benchmarks/object/get.bench.ts::get::with undefined nested path and default value
-3%
33.9 µs
34.9 µs
with class instance
benchmarks/typed/isObject.bench.ts::isObject::with class instance
-3%
34.6 µs
35.7 µs
with object literal
benchmarks/typed/isPlainObject.bench.ts::isPlainObject::with object literal
-5%
21.4 µs
22.4 µs
with complex objects
benchmarks/typed/isEqual.bench.ts::isEqual::with complex objects
-6%
200.8 µs
212.8 µs
with float
benchmarks/typed/isNumber.bench.ts::isNumber::with float
-6%
18 µs
19.2 µs
with valid input
benchmarks/string/template.bench.ts::template::with valid input
-7%
42.9 µs
46.1 µs
with valid input
benchmarks/object/construct.bench.ts::construct::with valid input
-9%
153.9 µs
169 µs

Commits

Click on a commit to change the comparison range
base
main
e2c2ce3
-53%
chore: format & fix linter related problems
abbcbc3
4 months ago
+39%
Merge branch 'main' into feat/array/mapify
b5c7777
4 months ago
by aleclarson
ResourcesHomePricingDocsBlogGitHubChangelog
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.