ctx-core 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/LessThan/index.d.ts +10 -0
- package/all/LessThan/index.js +1 -0
- package/all/MAX_INT/index.d.ts +1 -0
- package/all/MAX_INT/index.js +1 -0
- package/all/MIN_INT/index.d.ts +1 -0
- package/all/MIN_INT/index.js +1 -0
- package/all/Map__object/index.d.ts +5 -0
- package/all/Map__object/index.js +9 -0
- package/all/Map__object/index.test.ts +7 -0
- package/all/NoRepetition/index.d.ts +6 -0
- package/all/NoRepetition/index.js +1 -0
- package/all/NumericRange/index.d.ts +8 -0
- package/all/NumericRange/index.js +1 -0
- package/all/NumericUnit/index.d.ts +4 -0
- package/all/NumericUnit/index.js +1 -0
- package/all/PHI/index.d.ts +1 -0
- package/all/PHI/index.js +2 -0
- package/all/Request/index.d.ts +2 -0
- package/all/Request/index.js +2 -0
- package/all/Response/index.d.ts +1 -0
- package/all/Response/index.js +2 -0
- package/all/TagType/index.d.ts +2 -0
- package/all/TagType/index.js +1 -0
- package/all/Timeout/index.d.ts +1 -0
- package/all/Timeout/index.js +1 -0
- package/all/UnorderedTuple/index.d.ts +4 -0
- package/all/UnorderedTuple/index.js +1 -0
- package/all/a/index.d.ts +1 -0
- package/all/a/index.js +3 -0
- package/all/a_assign/index.d.ts +7 -0
- package/all/a_assign/index.js +12 -0
- package/all/a_in_idx_a_map/index.d.ts +12 -0
- package/all/a_in_idx_a_map/index.js +13 -0
- package/all/a_item/index.d.ts +12 -0
- package/all/a_item/index.js +1 -0
- package/all/a_length/index.d.ts +18 -0
- package/all/a_length/index.js +21 -0
- package/all/a_nowrap/index.d.ts +7 -0
- package/all/a_nowrap/index.js +1 -0
- package/all/a_present/index.d.ts +19 -0
- package/all/a_present/index.js +24 -0
- package/all/a_some/index.d.ts +13 -0
- package/all/a_some/index.js +20 -0
- package/all/abbrev_month_a/index.d.ts +2 -0
- package/all/abbrev_month_a/index.js +15 -0
- package/all/abbreviate_number_str/index.d.ts +10 -0
- package/all/abbreviate_number_str/index.js +28 -0
- package/all/acronym/index.d.ts +2 -0
- package/all/acronym/index.js +8 -0
- package/all/add/index.d.ts +11 -0
- package/all/add/index.js +24 -0
- package/all/add/index.test.ts +14 -0
- package/all/all_union_a/index.d.ts +10 -0
- package/all/all_union_a/index.js +8 -0
- package/all/and/index.d.ts +29 -0
- package/all/and/index.js +45 -0
- package/all/and/index.test.ts +10 -0
- package/all/and_call/index.d.ts +16 -0
- package/all/and_call/index.js +20 -0
- package/all/andand/index.d.ts +14 -0
- package/all/andand/index.js +19 -0
- package/all/andand_or/index.d.ts +13 -0
- package/all/andand_or/index.js +14 -0
- package/all/andandfn/index.d.ts +26 -0
- package/all/andandfn/index.js +39 -0
- package/all/apply/index.d.ts +14 -0
- package/all/apply/index.js +14 -0
- package/all/arg_i0_a/index.d.ts +11 -0
- package/all/arg_i0_a/index.js +11 -0
- package/all/array_types/index.d.ts +134 -0
- package/all/array_types/index.js +1 -0
- package/all/assign/index.d.ts +4 -0
- package/all/assign/index.js +5 -0
- package/all/assign_fn_key_a/index.d.ts +15 -0
- package/all/assign_fn_key_a/index.js +24 -0
- package/all/assign_unless_null/index.d.ts +7 -0
- package/all/assign_unless_null/index.js +11 -0
- package/all/async_gen_a/index.d.ts +3 -0
- package/all/async_gen_a/index.js +9 -0
- package/all/async_gen_a/index.test.ts +12 -0
- package/all/at_date/index.d.ts +1 -0
- package/all/at_date/index.js +9 -0
- package/all/atob/index.d.ts +3 -0
- package/all/atob/index.js +16 -0
- package/all/atob_Uint32Array/index.d.ts +5 -0
- package/all/atob_Uint32Array/index.js +16 -0
- package/all/bad_credentials/index.d.ts +30 -0
- package/all/bad_credentials/index.js +44 -0
- package/all/bad_gateway/index.d.ts +20 -0
- package/all/bad_gateway/index.js +45 -0
- package/all/bad_request/index.d.ts +20 -0
- package/all/bad_request/index.js +45 -0
- package/all/base16_random/index.d.ts +2 -0
- package/all/base16_random/index.js +14 -0
- package/all/base64__buffer/index.d.ts +6 -0
- package/all/base64__buffer/index.js +15 -0
- package/all/batch_queue/index.d.ts +5 -0
- package/all/batch_queue/index.js +44 -0
- package/all/batch_queue/index.test.ts +149 -0
- package/all/be/index.d.ts +5 -0
- package/all/be/index.js +11 -0
- package/all/be_/index.d.ts +124 -0
- package/all/be_/index.js +272 -0
- package/all/be_/index.test.ts +251 -0
- package/all/be_arg_triple/index.d.ts +21 -0
- package/all/be_arg_triple/index.js +41 -0
- package/all/be_prop_pair/index.d.ts +36 -0
- package/all/be_prop_pair/index.js +54 -0
- package/all/be_prop_pair/index.test.ts +137 -0
- package/all/binary_sort_rank/index.d.ts +12 -0
- package/all/binary_sort_rank/index.js +30 -0
- package/all/bind_apply/index.d.ts +17 -0
- package/all/bind_apply/index.js +18 -0
- package/all/bind_call/index.d.ts +21 -0
- package/all/bind_call/index.js +18 -0
- package/all/bind_map_apply/index.d.ts +17 -0
- package/all/bind_map_apply/index.js +19 -0
- package/all/bind_map_call/index.d.ts +18 -0
- package/all/bind_map_call/index.js +21 -0
- package/all/btoa/index.d.ts +3 -0
- package/all/btoa/index.js +18 -0
- package/all/btoa/index.test.ts +7 -0
- package/all/btoa_Uint32Array/index.d.ts +8 -0
- package/all/btoa_Uint32Array/index.js +20 -0
- package/all/buffer__base64/index.d.ts +6 -0
- package/all/buffer__base64/index.js +22 -0
- package/all/buffer__hex/index.d.ts +1 -0
- package/all/buffer__hex/index.js +14 -0
- package/all/call/index.d.ts +22 -0
- package/all/call/index.js +23 -0
- package/all/call_assign/index.d.ts +13 -0
- package/all/call_assign/index.js +18 -0
- package/all/call_fn_a/index.d.ts +7 -0
- package/all/call_fn_a/index.js +14 -0
- package/all/call_or_fn/index.d.ts +13 -0
- package/all/call_or_fn/index.js +20 -0
- package/all/case_insensitive_eql/index.d.ts +1 -0
- package/all/case_insensitive_eql/index.js +14 -0
- package/all/chain/index.d.ts +22 -0
- package/all/chain/index.js +48 -0
- package/all/chunk_aa/index.d.ts +35 -0
- package/all/chunk_aa/index.js +20 -0
- package/all/chunk_aa/index.test.ts +11 -0
- package/all/circular_idx/index.d.ts +10 -0
- package/all/circular_idx/index.js +13 -0
- package/all/clear_ctx/index.d.ts +10 -0
- package/all/clear_ctx/index.js +19 -0
- package/all/clone/index.d.ts +6 -0
- package/all/clone/index.js +9 -0
- package/all/clone_assign_fn_key_a/index.d.ts +14 -0
- package/all/clone_assign_fn_key_a/index.js +18 -0
- package/all/color_hex_rgb__comma_delim_str/index.d.ts +11 -0
- package/all/color_hex_rgb__comma_delim_str/index.js +16 -0
- package/all/color_hsv/index.d.ts +18 -0
- package/all/color_hsv/index.js +36 -0
- package/all/color_hsv_phi_rgb_a/index.d.ts +19 -0
- package/all/color_hsv_phi_rgb_a/index.js +32 -0
- package/all/color_invert_rgb_a/index.d.ts +12 -0
- package/all/color_invert_rgb_a/index.js +18 -0
- package/all/color_rgb/index.d.ts +7 -0
- package/all/color_rgb/index.js +22 -0
- package/all/color_rgb/index.test.ts +12 -0
- package/all/columns_nansum_matrix/index.d.ts +4 -0
- package/all/columns_nansum_matrix/index.js +17 -0
- package/all/combinators/index.d.ts +52 -0
- package/all/combinators/index.js +48 -0
- package/all/combinators/index.test.ts +8 -0
- package/all/comma_number_str/index.d.ts +2 -0
- package/all/comma_number_str/index.js +8 -0
- package/all/compact/index.d.ts +15 -0
- package/all/compact/index.js +27 -0
- package/all/compact_a_ctx/index.d.ts +11 -0
- package/all/compact_a_ctx/index.js +21 -0
- package/all/compare/index.d.ts +23 -0
- package/all/compare/index.js +32 -0
- package/all/compose/index.d.ts +9 -0
- package/all/compose/index.js +17 -0
- package/all/concat/index.d.ts +9 -0
- package/all/concat/index.js +17 -0
- package/all/concat_truthy_a/index.d.ts +15 -0
- package/all/concat_truthy_a/index.js +19 -0
- package/all/console__error/index.d.ts +7 -0
- package/all/console__error/index.js +18 -0
- package/all/crypto/index.d.ts +1 -0
- package/all/crypto/index.js +11 -0
- package/all/crypto__sign/index.d.ts +13 -0
- package/all/crypto__sign/index.js +18 -0
- package/all/ctx/index.d.ts +4 -0
- package/all/ctx/index.js +25 -0
- package/all/ctx/index.test.ts +16 -0
- package/all/currencies/index.d.ts +3 -0
- package/all/currencies/index.js +120 -0
- package/all/currency_code/index.d.ts +4 -0
- package/all/currency_code/index.js +1 -0
- package/all/currency_str/index.d.ts +23 -0
- package/all/currency_str/index.js +38 -0
- package/all/currency_symbol/index.d.ts +8 -0
- package/all/currency_symbol/index.js +19 -0
- package/all/curry/index.d.ts +14 -0
- package/all/curry/index.js +32 -0
- package/all/date/index.d.ts +15 -0
- package/all/date/index.js +5 -0
- package/all/date_append_local_tz/index.d.ts +2 -0
- package/all/date_append_local_tz/index.js +9 -0
- package/all/day/index.d.ts +7 -0
- package/all/day/index.js +8 -0
- package/all/day_seconds/index.d.ts +2 -0
- package/all/day_seconds/index.js +2 -0
- package/all/debounce/index.d.ts +22 -0
- package/all/debounce/index.js +44 -0
- package/all/debounce_mapreduce/index.d.ts +6 -0
- package/all/debounce_mapreduce/index.js +18 -0
- package/all/debounce_mapreduce/index.test.ts +26 -0
- package/all/deep_clone/index.d.ts +5 -0
- package/all/deep_clone/index.js +10 -0
- package/all/defaults/index.d.ts +6 -0
- package/all/defaults/index.js +14 -0
- package/all/deg_rad/index.d.ts +5 -0
- package/all/deg_rad/index.js +7 -0
- package/all/diff_date/index.d.ts +1 -0
- package/all/diff_date/index.js +9 -0
- package/all/difference_a/index.d.ts +12 -0
- package/all/difference_a/index.js +15 -0
- package/all/difference_by/index.d.ts +9 -0
- package/all/difference_by/index.js +30 -0
- package/all/difference_set/index.d.ts +13 -0
- package/all/difference_set/index.js +23 -0
- package/all/digest__algorithm/index.d.ts +1 -0
- package/all/digest__algorithm/index.js +1 -0
- package/all/distribution_random_float/index.d.ts +4 -0
- package/all/distribution_random_float/index.js +12 -0
- package/all/distribution_random_int/index.d.ts +4 -0
- package/all/distribution_random_int/index.js +12 -0
- package/all/div/index.d.ts +4 -0
- package/all/div/index.js +10 -0
- package/all/each/index.d.ts +14 -0
- package/all/each/index.js +23 -0
- package/all/ensure/index.d.ts +11 -0
- package/all/ensure/index.js +26 -0
- package/all/ensure__refresh/index.d.ts +20 -0
- package/all/ensure__refresh/index.js +23 -0
- package/all/entries_gen/index.d.ts +5 -0
- package/all/entries_gen/index.js +12 -0
- package/all/entries_gen/index.test.ts +20 -0
- package/all/eq/index.d.ts +21 -0
- package/all/eq/index.js +28 -0
- package/all/eql/index.d.ts +23 -0
- package/all/eql/index.js +37 -0
- package/all/eql_a/index.d.ts +11 -0
- package/all/eql_a/index.js +20 -0
- package/all/eql_fn_a/index.d.ts +16 -0
- package/all/eql_fn_a/index.js +22 -0
- package/all/equidistant_segment_point_a/index.d.ts +14 -0
- package/all/equidistant_segment_point_a/index.js +25 -0
- package/all/error__print/index.d.ts +5 -0
- package/all/error__print/index.js +18 -0
- package/all/error_o/index.d.ts +27 -0
- package/all/error_o/index.js +25 -0
- package/all/every/index.d.ts +33 -0
- package/all/every/index.js +43 -0
- package/all/every_arg/index.d.ts +15 -0
- package/all/every_arg/index.js +15 -0
- package/all/every_arg/index.test.ts +37 -0
- package/all/exclude/index.d.ts +7 -0
- package/all/exclude/index.js +17 -0
- package/all/extract/index.d.ts +14 -0
- package/all/extract/index.js +24 -0
- package/all/extract/index.test.ts +18 -0
- package/all/falsy/index.d.ts +7 -0
- package/all/falsy/index.js +1 -0
- package/all/falsy__none/index.d.ts +9 -0
- package/all/falsy__none/index.js +23 -0
- package/all/falsy__none/index.test.ts +58 -0
- package/all/falsy_async_guard/index.d.ts +7 -0
- package/all/falsy_async_guard/index.js +13 -0
- package/all/falsy_guard/index.d.ts +5 -0
- package/all/falsy_guard/index.js +13 -0
- package/all/fetch/index.d.ts +5 -0
- package/all/fetch/index.js +2 -0
- package/all/fetch__template_pair/index.d.ts +40 -0
- package/all/fetch__template_pair/index.js +20 -0
- package/all/fetch__template_pair/index.test.ts +46 -0
- package/all/fetch_method/index.d.ts +5 -0
- package/all/fetch_method/index.js +8 -0
- package/all/fetch_response__throw/index.d.ts +7 -0
- package/all/fetch_response__throw/index.js +15 -0
- package/all/fetch_response__throw/index.test.ts +19 -0
- package/all/fetch_response_pair/index.d.ts +5 -0
- package/all/fetch_response_pair/index.js +13 -0
- package/all/fibonacci_number/index.d.ts +5 -0
- package/all/fibonacci_number/index.js +11 -0
- package/all/filter/index.d.ts +35 -0
- package/all/filter/index.js +55 -0
- package/all/filter_o/index.d.ts +31 -0
- package/all/filter_o/index.js +39 -0
- package/all/find/index.d.ts +30 -0
- package/all/find/index.js +51 -0
- package/all/first/index.d.ts +17 -0
- package/all/first/index.js +23 -0
- package/all/flatten/index.d.ts +14 -0
- package/all/flatten/index.js +28 -0
- package/all/flip/index.d.ts +5 -0
- package/all/flip/index.js +10 -0
- package/all/float_isNaN/index.d.ts +2 -0
- package/all/float_isNaN/index.js +9 -0
- package/all/fn_mean/index.d.ts +13 -0
- package/all/fn_mean/index.js +21 -0
- package/all/fn_mean/index.test.ts +13 -0
- package/all/fn_pipe/index.d.ts +70 -0
- package/all/fn_pipe/index.js +11 -0
- package/all/fn_pipe/index.test.ts +18 -0
- package/all/fn_sum/index.d.ts +12 -0
- package/all/fn_sum/index.js +17 -0
- package/all/fn_sum/index.test.ts +13 -0
- package/all/format_date_prose/index.d.ts +1 -0
- package/all/format_date_prose/index.js +10 -0
- package/all/format_utc_date_prose/index.d.ts +1 -0
- package/all/format_utc_date_prose/index.js +10 -0
- package/all/globalThis__prop__ensure/index.d.ts +4 -0
- package/all/globalThis__prop__ensure/index.js +10 -0
- package/all/globalThis__prop__ensure/index.test.ts +22 -0
- package/all/gte_0_a/index.d.ts +11 -0
- package/all/gte_0_a/index.js +21 -0
- package/all/hasOwnProperty_pick/index.d.ts +9 -0
- package/all/hasOwnProperty_pick/index.js +17 -0
- package/all/has_key/index.d.ts +15 -0
- package/all/has_key/index.js +38 -0
- package/all/has_multiple/index.d.ts +9 -0
- package/all/has_multiple/index.js +14 -0
- package/all/has_some_key/index.d.ts +5 -0
- package/all/has_some_key/index.js +12 -0
- package/all/head_arg_a/index.d.ts +12 -0
- package/all/head_arg_a/index.js +15 -0
- package/all/headers/index.d.ts +2 -0
- package/all/headers/index.js +10 -0
- package/all/hex__digest/index.d.ts +5 -0
- package/all/hex__digest/index.js +24 -0
- package/all/hex_int/index.d.ts +5 -0
- package/all/hex_int/index.js +7 -0
- package/all/hmac/index.d.ts +6 -0
- package/all/hmac/index.js +32 -0
- package/all/hmac_key/index.d.ts +5 -0
- package/all/hmac_key/index.js +30 -0
- package/all/hostname/index.d.ts +2 -0
- package/all/hostname/index.js +9 -0
- package/all/hour/index.d.ts +7 -0
- package/all/hour/index.js +8 -0
- package/all/hour_seconds/index.d.ts +2 -0
- package/all/hour_seconds/index.js +2 -0
- package/all/http_error/index.d.ts +20 -0
- package/all/http_error/index.js +35 -0
- package/all/idx/index.d.ts +11 -0
- package/all/idx/index.js +17 -0
- package/all/idx_a/index.d.ts +9 -0
- package/all/idx_a/index.js +20 -0
- package/all/idx_a/index.test.ts +9 -0
- package/all/idx_filter/index.d.ts +32 -0
- package/all/idx_filter/index.js +57 -0
- package/all/idx_key_r/index.d.ts +49 -0
- package/all/idx_key_r/index.js +78 -0
- package/all/idx_reject/index.d.ts +30 -0
- package/all/idx_reject/index.js +45 -0
- package/all/idx_sort_a/index.d.ts +23 -0
- package/all/idx_sort_a/index.js +39 -0
- package/all/idx_sort_a__sort_idx_o/index.d.ts +16 -0
- package/all/idx_sort_a__sort_idx_o/index.js +21 -0
- package/all/idx_sort_r_a/index.d.ts +7 -0
- package/all/idx_sort_r_a/index.js +14 -0
- package/all/if_null_set_false/index.d.ts +7 -0
- package/all/if_null_set_false/index.js +14 -0
- package/all/ifelse/index.d.ts +6 -0
- package/all/ifelse/index.js +10 -0
- package/all/iife/index.d.ts +6 -0
- package/all/iife/index.js +9 -0
- package/all/indendation/index.d.ts +9 -0
- package/all/indendation/index.js +23 -0
- package/all/index.d.ts +408 -0
- package/all/index.js +408 -0
- package/all/indexOf/index.d.ts +6 -0
- package/all/indexOf/index.js +9 -0
- package/all/insert/index.d.ts +6 -0
- package/all/insert/index.js +10 -0
- package/all/int_hex/index.d.ts +5 -0
- package/all/int_hex/index.js +7 -0
- package/all/intersection_a/index.d.ts +15 -0
- package/all/intersection_a/index.js +15 -0
- package/all/intersection_by/index.d.ts +10 -0
- package/all/intersection_by/index.js +44 -0
- package/all/intersection_set/index.d.ts +14 -0
- package/all/intersection_set/index.js +25 -0
- package/all/invalid_argument/index.d.ts +30 -0
- package/all/invalid_argument/index.js +43 -0
- package/all/invalid_state/index.d.ts +32 -0
- package/all/invalid_state/index.js +44 -0
- package/all/invert/index.d.ts +4 -0
- package/all/invert/index.js +8 -0
- package/all/invert_idx_a/index.d.ts +12 -0
- package/all/invert_idx_a/index.js +20 -0
- package/all/invert_idx_a/index.test.ts +7 -0
- package/all/isArray/index.d.ts +5 -0
- package/all/isArray/index.js +9 -0
- package/all/isFloat/index.d.ts +1 -0
- package/all/isFloat/index.js +4 -0
- package/all/isFloat_andor/index.d.ts +3 -0
- package/all/isFloat_andor/index.js +9 -0
- package/all/isFloat_or/index.d.ts +1 -0
- package/all/isFloat_or/index.js +5 -0
- package/all/isLowerCase/index.d.ts +1 -0
- package/all/isLowerCase/index.js +7 -0
- package/all/isNumber/index.d.ts +5 -0
- package/all/isNumber/index.js +5 -0
- package/all/isNumber_andor/index.d.ts +3 -0
- package/all/isNumber_andor/index.js +8 -0
- package/all/isNumber_or/index.d.ts +1 -0
- package/all/isNumber_or/index.js +5 -0
- package/all/isObject/index.d.ts +8 -0
- package/all/isObject/index.js +12 -0
- package/all/isPromise/index.d.ts +1 -0
- package/all/isPromise/index.js +7 -0
- package/all/isString/index.d.ts +1 -0
- package/all/isString/index.js +7 -0
- package/all/isUpperCase/index.d.ts +1 -0
- package/all/isUpperCase/index.js +7 -0
- package/all/item_r_idx/index.d.ts +27 -0
- package/all/item_r_idx/index.js +38 -0
- package/all/json/index.d.ts +2 -0
- package/all/json/index.js +1 -0
- package/all/key_compare/index.d.ts +14 -0
- package/all/key_compare/index.js +19 -0
- package/all/key_r/index.d.ts +48 -0
- package/all/key_r/index.js +63 -0
- package/all/key_r_a/index.d.ts +15 -0
- package/all/key_r_a/index.js +26 -0
- package/all/keyof/index.d.ts +1 -0
- package/all/keyof/index.js +1 -0
- package/all/keys/index.d.ts +4 -0
- package/all/keys/index.js +5 -0
- package/all/lPad/index.d.ts +1 -0
- package/all/lPad/index.js +11 -0
- package/all/last/index.d.ts +18 -0
- package/all/last/index.js +22 -0
- package/all/left_and/index.d.ts +12 -0
- package/all/left_and/index.js +14 -0
- package/all/left_or/index.d.ts +11 -0
- package/all/left_or/index.js +14 -0
- package/all/line__parse/index.d.ts +18 -0
- package/all/line__parse/index.js +97 -0
- package/all/line__parse/index.test.ts +96 -0
- package/all/line__transform_stream/index.d.ts +8 -0
- package/all/line__transform_stream/index.js +53 -0
- package/all/line__transform_stream/index.test.ts +47 -0
- package/all/lte_0_a/index.d.ts +11 -0
- package/all/lte_0_a/index.js +20 -0
- package/all/m_m_yyyy/index.d.ts +8 -0
- package/all/m_m_yyyy/index.js +24 -0
- package/all/m_yy/index.d.ts +2 -0
- package/all/m_yy/index.js +9 -0
- package/all/m_yyyy/index.d.ts +2 -0
- package/all/m_yyyy/index.js +10 -0
- package/all/many_andand/index.d.ts +11 -0
- package/all/many_andand/index.js +12 -0
- package/all/many_andand_or/index.d.ts +17 -0
- package/all/many_andand_or/index.js +14 -0
- package/all/map/index.d.ts +42 -0
- package/all/map/index.js +45 -0
- package/all/map_andand/index.d.ts +30 -0
- package/all/map_andand/index.js +34 -0
- package/all/map_andand_or/index.d.ts +13 -0
- package/all/map_andand_or/index.js +13 -0
- package/all/map_andandfn/index.d.ts +28 -0
- package/all/map_andandfn/index.js +29 -0
- package/all/map_apply/index.d.ts +17 -0
- package/all/map_apply/index.js +15 -0
- package/all/map_call/index.d.ts +22 -0
- package/all/map_call/index.js +26 -0
- package/all/map_find/index.d.ts +32 -0
- package/all/map_find/index.js +38 -0
- package/all/map_fn/index.d.ts +4 -0
- package/all/map_fn/index.js +1 -0
- package/all/map_inverse/index.d.ts +5 -0
- package/all/map_inverse/index.js +9 -0
- package/all/map_obj/index.d.ts +30 -0
- package/all/map_obj/index.js +28 -0
- package/all/map_obj_andand/index.d.ts +28 -0
- package/all/map_obj_andand/index.js +28 -0
- package/all/matrix__dot/index.d.ts +6 -0
- package/all/matrix__dot/index.js +22 -0
- package/all/matrix__dot__scalar/index.d.ts +1 -0
- package/all/matrix__dot__scalar/index.js +9 -0
- package/all/matrix__normalize/index.d.ts +4 -0
- package/all/matrix__normalize/index.js +20 -0
- package/all/matrix__validate_length/index.d.ts +1 -0
- package/all/matrix__validate_length/index.js +13 -0
- package/all/maybe/index.d.ts +7 -0
- package/all/maybe/index.js +1 -0
- package/all/mean/index.d.ts +9 -0
- package/all/mean/index.js +17 -0
- package/all/mean/index.test.ts +10 -0
- package/all/median/index.d.ts +4 -0
- package/all/median/index.js +19 -0
- package/all/merge/index.d.ts +7 -0
- package/all/merge/index.js +25 -0
- package/all/minute/index.d.ts +7 -0
- package/all/minute/index.js +7 -0
- package/all/minute_seconds/index.d.ts +2 -0
- package/all/minute_seconds/index.js +2 -0
- package/all/missing_argument/index.d.ts +31 -0
- package/all/missing_argument/index.js +44 -0
- package/all/mixin/index.d.ts +13 -0
- package/all/mixin/index.js +34 -0
- package/all/money_str/index.d.ts +13 -0
- package/all/money_str/index.js +26 -0
- package/all/month_a/index.d.ts +5 -0
- package/all/month_a/index.js +18 -0
- package/all/month_ms/index.d.ts +5 -0
- package/all/month_ms/index.js +6 -0
- package/all/month_seconds/index.d.ts +2 -0
- package/all/month_seconds/index.js +2 -0
- package/all/ms/index.d.ts +5 -0
- package/all/ms/index.js +12 -0
- package/all/mul/index.d.ts +4 -0
- package/all/mul/index.js +12 -0
- package/all/name_sort/index.d.ts +14 -0
- package/all/name_sort/index.js +13 -0
- package/all/negative/index.d.ts +4 -0
- package/all/negative/index.js +8 -0
- package/all/neq/index.d.ts +14 -0
- package/all/neq/index.js +25 -0
- package/all/neql/index.d.ts +15 -0
- package/all/neql/index.js +24 -0
- package/all/next_idx/index.d.ts +8 -0
- package/all/next_idx/index.js +14 -0
- package/all/nf/index.d.ts +1 -0
- package/all/nf/index.js +1 -0
- package/all/no_comma_str/index.d.ts +2 -0
- package/all/no_comma_str/index.js +9 -0
- package/all/noinit/index.d.ts +9 -0
- package/all/noinit/index.js +16 -0
- package/all/noop/index.d.ts +4 -0
- package/all/noop/index.js +6 -0
- package/all/normal_random/index.d.ts +2 -0
- package/all/normal_random/index.js +19 -0
- package/all/normal_random_float/index.d.ts +2 -0
- package/all/normal_random_float/index.js +6 -0
- package/all/normal_random_int/index.d.ts +2 -0
- package/all/normal_random_int/index.js +6 -0
- package/all/not/index.d.ts +17 -0
- package/all/not/index.js +24 -0
- package/all/not_found/index.d.ts +20 -0
- package/all/not_found/index.js +44 -0
- package/all/not_nullish__query_str/index.d.ts +6 -0
- package/all/not_nullish__query_str/index.js +19 -0
- package/all/notnot/index.d.ts +12 -0
- package/all/notnot/index.js +23 -0
- package/all/null/index.d.ts +5 -0
- package/all/null/index.js +10 -0
- package/all/nullish/index.d.ts +2 -0
- package/all/nullish/index.js +1 -0
- package/all/nullish__guard/index.d.ts +10 -0
- package/all/nullish__guard/index.js +16 -0
- package/all/nullish__guard__async/index.d.ts +10 -0
- package/all/nullish__guard__async/index.js +18 -0
- package/all/nullish__none/index.d.ts +12 -0
- package/all/nullish__none/index.js +25 -0
- package/all/nullish__none/index.test.ts +58 -0
- package/all/nullish__not_all/index.d.ts +8 -0
- package/all/nullish__not_all/index.js +16 -0
- package/all/nullish__not_all/index.test.ts +70 -0
- package/all/nullish_or/index.d.ts +5 -0
- package/all/nullish_or/index.js +11 -0
- package/all/number__count/index.d.ts +4 -0
- package/all/number__count/index.js +13 -0
- package/all/number__count/index.test.ts +7 -0
- package/all/number_or_mdash_str/index.d.ts +2 -0
- package/all/number_or_mdash_str/index.js +5 -0
- package/all/numerator_or_0_avg/index.d.ts +5 -0
- package/all/numerator_or_0_avg/index.js +10 -0
- package/all/numerator_or_0_sum/index.d.ts +5 -0
- package/all/numerator_or_0_sum/index.js +10 -0
- package/all/numeric_range/index.d.ts +7 -0
- package/all/numeric_range/index.js +19 -0
- package/all/numeric_range/index.test.ts +9 -0
- package/all/o_a_present/index.d.ts +18 -0
- package/all/o_a_present/index.js +18 -0
- package/all/o_some/index.d.ts +13 -0
- package/all/o_some/index.js +16 -0
- package/all/obj_key_r/index.d.ts +10 -0
- package/all/obj_key_r/index.js +19 -0
- package/all/offset_destructure_aa/index.d.ts +13 -0
- package/all/offset_destructure_aa/index.js +22 -0
- package/all/offset_i/index.d.ts +8 -0
- package/all/offset_i/index.js +13 -0
- package/all/offset_i_slice/index.d.ts +19 -0
- package/all/offset_i_slice/index.js +26 -0
- package/all/omit/index.d.ts +15 -0
- package/all/omit/index.js +26 -0
- package/all/omit/index.test.ts +12 -0
- package/all/one_andand/index.d.ts +13 -0
- package/all/one_andand/index.js +15 -0
- package/all/one_andand_or/index.d.ts +19 -0
- package/all/one_andand_or/index.js +18 -0
- package/all/or/index.d.ts +41 -0
- package/all/or/index.js +47 -0
- package/all/or_in/index.d.ts +9 -0
- package/all/or_in/index.js +14 -0
- package/all/or_null/index.d.ts +11 -0
- package/all/or_null/index.js +10 -0
- package/all/or_property/index.d.ts +9 -0
- package/all/or_property/index.js +15 -0
- package/all/pad2/index.d.ts +1 -0
- package/all/pad2/index.js +7 -0
- package/all/parseFloat_andor/index.d.ts +3 -0
- package/all/parseFloat_andor/index.js +5 -0
- package/all/parseFloat_andor/index.test.ts +11 -0
- package/all/parseFloat_or/index.d.ts +1 -0
- package/all/parseFloat_or/index.js +5 -0
- package/all/parseFloat_or/index.test.ts +9 -0
- package/all/parseInt_andor/index.d.ts +5 -0
- package/all/parseInt_andor/index.js +5 -0
- package/all/parseInt_andor/index.test.ts +11 -0
- package/all/parseInt_or/index.d.ts +1 -0
- package/all/parseInt_or/index.js +5 -0
- package/all/parseInt_or/index.test.ts +10 -0
- package/all/pathname/index.d.ts +2 -0
- package/all/pathname/index.js +8 -0
- package/all/percentage_str/index.d.ts +2 -0
- package/all/percentage_str/index.js +9 -0
- package/all/percentage_str_float/index.d.ts +2 -0
- package/all/percentage_str_float/index.js +4 -0
- package/all/performance__now/index.d.ts +1 -0
- package/all/performance__now/index.js +32 -0
- package/all/pick/index.d.ts +18 -0
- package/all/pick/index.js +35 -0
- package/all/pick_keys/index.d.ts +8 -0
- package/all/pick_keys/index.js +12 -0
- package/all/pick_val_a/index.d.ts +14 -0
- package/all/pick_val_a/index.js +22 -0
- package/all/prev_idx/index.d.ts +8 -0
- package/all/prev_idx/index.js +14 -0
- package/all/promise/index.d.ts +2 -0
- package/all/promise/index.js +1 -0
- package/all/promise_o/index.d.ts +7 -0
- package/all/promise_o/index.js +11 -0
- package/all/promise_timeout/index.d.ts +5 -0
- package/all/promise_timeout/index.js +23 -0
- package/all/prototype_mixin/index.d.ts +8 -0
- package/all/prototype_mixin/index.js +20 -0
- package/all/push/index.d.ts +15 -0
- package/all/push/index.js +17 -0
- package/all/quantile/index.d.ts +5 -0
- package/all/quantile/index.js +16 -0
- package/all/query_str/index.d.ts +27 -0
- package/all/query_str/index.js +46 -0
- package/all/query_str/index.test.ts +43 -0
- package/all/query_str__searchParams/index.d.ts +1 -0
- package/all/query_str__searchParams/index.js +8 -0
- package/all/query_str__searchParams_o/index.d.ts +3 -0
- package/all/query_str__searchParams_o/index.js +11 -0
- package/all/queue/index.d.ts +23 -0
- package/all/queue/index.js +130 -0
- package/all/queue/index.test.ts +207 -0
- package/all/rPad/index.d.ts +1 -0
- package/all/rPad/index.js +11 -0
- package/all/r_val_a/index.d.ts +23 -0
- package/all/r_val_a/index.js +28 -0
- package/all/rad_deg/index.d.ts +5 -0
- package/all/rad_deg/index.js +7 -0
- package/all/random_idx/index.d.ts +8 -0
- package/all/random_idx/index.js +12 -0
- package/all/rank/index.d.ts +10 -0
- package/all/rank/index.js +16 -0
- package/all/rate_limit/index.d.ts +10 -0
- package/all/rate_limit/index.js +49 -0
- package/all/rc_be/index.d.ts +9 -0
- package/all/rc_be/index.js +17 -0
- package/all/rc_be_/index.d.ts +42 -0
- package/all/rc_be_/index.js +62 -0
- package/all/re_/index.d.ts +1 -0
- package/all/re_/index.js +8 -0
- package/all/readable_stream_OR_reader/index.d.ts +7 -0
- package/all/readable_stream_OR_reader/index.js +1 -0
- package/all/reduce/index.d.ts +51 -0
- package/all/reduce/index.js +51 -0
- package/all/regex_indexOf/index.d.ts +10 -0
- package/all/regex_indexOf/index.js +14 -0
- package/all/regex_lastIndexOf/index.d.ts +7 -0
- package/all/regex_lastIndexOf/index.js +25 -0
- package/all/reject/index.d.ts +39 -0
- package/all/reject/index.js +40 -0
- package/all/remove/index.d.ts +16 -0
- package/all/remove/index.js +27 -0
- package/all/remove_idx/index.d.ts +12 -0
- package/all/remove_idx/index.js +14 -0
- package/all/resolver_curry/index.d.ts +6 -0
- package/all/resolver_curry/index.js +1 -0
- package/all/response_o/index.d.ts +10 -0
- package/all/response_o/index.js +17 -0
- package/all/response_pair/index.d.ts +11 -0
- package/all/response_pair/index.js +23 -0
- package/all/response_pair/index.test.ts +30 -0
- package/all/reverse/index.d.ts +16 -0
- package/all/reverse/index.js +16 -0
- package/all/right_and/index.d.ts +14 -0
- package/all/right_and/index.js +15 -0
- package/all/right_or/index.d.ts +14 -0
- package/all/right_or/index.js +16 -0
- package/all/round/index.d.ts +4 -0
- package/all/round/index.js +14 -0
- package/all/run/index.d.ts +8 -0
- package/all/run/index.js +10 -0
- package/all/run_pipe/index.d.ts +61 -0
- package/all/run_pipe/index.js +11 -0
- package/all/run_pipe/index.test.ts +19 -0
- package/all/scalar__matrix__multiply/index.d.ts +7 -0
- package/all/scalar__matrix__multiply/index.js +16 -0
- package/all/searchParams_o/index.d.ts +3 -0
- package/all/searchParams_o/index.js +13 -0
- package/all/seconds/index.d.ts +2 -0
- package/all/seconds/index.js +10 -0
- package/all/segment_point_index/index.d.ts +5 -0
- package/all/segment_point_index/index.js +13 -0
- package/all/selector_splice/index.d.ts +13 -0
- package/all/selector_splice/index.js +17 -0
- package/all/sequence/index.d.ts +2 -0
- package/all/sequence/index.js +8 -0
- package/all/set_member/index.d.ts +6 -0
- package/all/set_member/index.js +1 -0
- package/all/since_time_text/index.d.ts +5 -0
- package/all/since_time_text/index.js +38 -0
- package/all/sleep/index.d.ts +1 -0
- package/all/sleep/index.js +7 -0
- package/all/slice/index.d.ts +38 -0
- package/all/slice/index.js +48 -0
- package/all/slice_arg_a/index.d.ts +28 -0
- package/all/slice_arg_a/index.js +17 -0
- package/all/slice_arg_spread_a/index.d.ts +29 -0
- package/all/slice_arg_spread_a/index.js +15 -0
- package/all/sort/index.d.ts +37 -0
- package/all/sort/index.js +41 -0
- package/all/sort_a/index.d.ts +24 -0
- package/all/sort_a/index.js +28 -0
- package/all/sort_idx_a/index.d.ts +21 -0
- package/all/sort_idx_a/index.js +25 -0
- package/all/sort_idx_o/index.d.ts +29 -0
- package/all/sort_idx_o/index.js +53 -0
- package/all/sort_idx_o/index.test.ts +12 -0
- package/all/sort_val_a/index.d.ts +21 -0
- package/all/sort_val_a/index.js +23 -0
- package/all/sort_val_a__transition_idx_a/index.d.ts +61 -0
- package/all/sort_val_a__transition_idx_a/index.js +108 -0
- package/all/sort_val_a__transition_idx_a/index.test.ts +99 -0
- package/all/sparse_a/index.d.ts +14 -0
- package/all/sparse_a/index.js +19 -0
- package/all/splice/index.d.ts +19 -0
- package/all/splice/index.js +23 -0
- package/all/splice_str/index.d.ts +8 -0
- package/all/splice_str/index.js +20 -0
- package/all/spread/index.d.ts +22 -0
- package/all/spread/index.js +24 -0
- package/all/spread_slice/index.d.ts +10 -0
- package/all/spread_slice/index.js +14 -0
- package/all/stacktrace/index.d.ts +5 -0
- package/all/stacktrace/index.js +42 -0
- package/all/std/index.d.ts +2 -0
- package/all/std/index.js +13 -0
- package/all/sub/index.d.ts +4 -0
- package/all/sub/index.js +10 -0
- package/all/table_txt/index.d.ts +2 -0
- package/all/table_txt/index.js +29 -0
- package/all/table_txt/index.test.ts +17 -0
- package/all/tap/index.d.ts +22 -0
- package/all/tap/index.js +26 -0
- package/all/tf/index.d.ts +2 -0
- package/all/tf/index.js +2 -0
- package/all/throttle/index.d.ts +9 -0
- package/all/throttle/index.js +26 -0
- package/all/tick/index.d.ts +8 -0
- package/all/tick/index.js +23 -0
- package/all/timedout/index.d.ts +2 -0
- package/all/timedout/index.js +9 -0
- package/all/timeout_promise/index.d.ts +10 -0
- package/all/timeout_promise/index.js +12 -0
- package/all/times/index.d.ts +8 -0
- package/all/times/index.js +13 -0
- package/all/timestamp_ms/index.d.ts +6 -0
- package/all/timestamp_ms/index.js +8 -0
- package/all/title_case_/index.d.ts +7 -0
- package/all/title_case_/index.js +24 -0
- package/all/toLocalDateString/index.d.ts +1 -0
- package/all/toLocalDateString/index.js +7 -0
- package/all/toString/index.d.ts +5 -0
- package/all/toString/index.js +5 -0
- package/all/tup/index.d.ts +13 -0
- package/all/tup/index.js +14 -0
- package/all/tuple__o/index.d.ts +7 -0
- package/all/tuple__o/index.js +1 -0
- package/all/tuple__union/index.d.ts +1 -0
- package/all/tuple__union/index.js +1 -0
- package/all/tuple_a_o/index.d.ts +10 -0
- package/all/tuple_a_o/index.js +1 -0
- package/all/unauthorized/index.d.ts +20 -0
- package/all/unauthorized/index.js +43 -0
- package/all/unformat_currency_str/index.d.ts +10 -0
- package/all/unformat_currency_str/index.js +27 -0
- package/all/uniform_random/index.d.ts +2 -0
- package/all/uniform_random/index.js +4 -0
- package/all/uniform_random_float/index.d.ts +2 -0
- package/all/uniform_random_float/index.js +6 -0
- package/all/uniform_random_int/index.d.ts +2 -0
- package/all/uniform_random_int/index.js +6 -0
- package/all/union_a/index.d.ts +14 -0
- package/all/union_a/index.js +18 -0
- package/all/union_by/index.d.ts +11 -0
- package/all/union_by/index.js +28 -0
- package/all/union_set/index.d.ts +14 -0
- package/all/union_set/index.js +18 -0
- package/all/unit_matrix/index.d.ts +1 -0
- package/all/unit_matrix/index.js +11 -0
- package/all/unpick/index.d.ts +11 -0
- package/all/unpick/index.js +28 -0
- package/all/unpick_keys/index.d.ts +8 -0
- package/all/unpick_keys/index.js +12 -0
- package/all/url__join/index.d.ts +5 -0
- package/all/url__join/index.js +24 -0
- package/all/url_basename/index.d.ts +2 -0
- package/all/url_basename/index.js +10 -0
- package/all/url_segment/index.d.ts +2 -0
- package/all/url_segment/index.js +1 -0
- package/all/urn_url/index.d.ts +11 -0
- package/all/urn_url/index.js +15 -0
- package/all/utc_MM_yyyy/index.d.ts +8 -0
- package/all/utc_MM_yyyy/index.js +24 -0
- package/all/utc_M_yyyy/index.d.ts +6 -0
- package/all/utc_M_yyyy/index.js +13 -0
- package/all/utc_m_yy/index.d.ts +5 -0
- package/all/utc_m_yy/index.js +12 -0
- package/all/utc_yyyymmdd/index.d.ts +5 -0
- package/all/utc_yyyymmdd/index.js +13 -0
- package/all/utc_yyyymmddhhmmss/index.d.ts +5 -0
- package/all/utc_yyyymmddhhmmss/index.js +18 -0
- package/all/uuid/index.d.ts +5 -0
- package/all/uuid/index.js +19 -0
- package/all/val/index.d.ts +4 -0
- package/all/val/index.js +8 -0
- package/all/value_key_aa/index.d.ts +10 -0
- package/all/value_key_aa/index.js +20 -0
- package/all/value_key_zip_r/index.d.ts +13 -0
- package/all/value_key_zip_r/index.js +20 -0
- package/all/value_r/index.d.ts +29 -0
- package/all/value_r/index.js +37 -0
- package/all/valueof/index.d.ts +1 -0
- package/all/valueof/index.js +1 -0
- package/all/values/index.d.ts +5 -0
- package/all/values/index.js +5 -0
- package/all/waitfor/index.d.ts +5 -0
- package/all/waitfor/index.js +16 -0
- package/all/waitfor_fibonacci_backoff/index.d.ts +8 -0
- package/all/waitfor_fibonacci_backoff/index.js +27 -0
- package/all/waitfor_val/index.d.ts +6 -0
- package/all/waitfor_val/index.js +20 -0
- package/all/weak_r/index.d.ts +28 -0
- package/all/weak_r/index.js +87 -0
- package/all/week/index.d.ts +1 -0
- package/all/week/index.js +2 -0
- package/all/wrap_a/index.d.ts +32 -0
- package/all/wrap_a/index.js +19 -0
- package/all/wrap_a_item/index.d.ts +5 -0
- package/all/wrap_a_item/index.js +1 -0
- package/all/wrap_aa/index.d.ts +23 -0
- package/all/wrap_aa/index.js +14 -0
- package/all/wrap_aa_item/index.d.ts +5 -0
- package/all/wrap_aa_item/index.js +1 -0
- package/all/wrap_concat/index.d.ts +11 -0
- package/all/wrap_concat/index.js +13 -0
- package/all/year_ms/index.d.ts +5 -0
- package/all/year_ms/index.js +6 -0
- package/all/year_seconds/index.d.ts +2 -0
- package/all/year_seconds/index.js +2 -0
- package/all/yyyymmdd/index.d.ts +2 -0
- package/all/yyyymmdd/index.js +10 -0
- package/all/yyyymmddhhmmss/index.d.ts +2 -0
- package/all/yyyymmddhhmmss/index.js +11 -0
- package/all/zip/index.d.ts +11 -0
- package/all/zip/index.js +17 -0
- package/all/zip__tuple_a/index.d.ts +13 -0
- package/all/zip__tuple_a/index.js +1 -0
- package/all/zip_o/index.d.ts +15 -0
- package/all/zip_o/index.js +22 -0
- package/all/zip_with/index.d.ts +43 -0
- package/all/zip_with/index.js +56 -0
- package/index.js +2 -0
- package/package.json +6 -1
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { wrap_a_T2 } from '../wrap_a/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* Returns first item in `a` where `fn(a[idx], idx)` is truthy.
|
|
4
|
+
*/
|
|
5
|
+
export declare function find<
|
|
6
|
+
In extends unknown = unknown
|
|
7
|
+
>(
|
|
8
|
+
a:wrap_a_T2<In>,
|
|
9
|
+
fn:(val:In, idx:number)=>any
|
|
10
|
+
):In|undefined
|
|
11
|
+
export declare function maybe_find<
|
|
12
|
+
In extends unknown = unknown, Or = null
|
|
13
|
+
>(
|
|
14
|
+
maybe_a:wrap_a_T2<In>,
|
|
15
|
+
fn:(val:In, idx:number)=>any,
|
|
16
|
+
or?:Or
|
|
17
|
+
):In|Or
|
|
18
|
+
/**
|
|
19
|
+
* Returns function that returns value from [find](#find) with `fn` argument.
|
|
20
|
+
*/
|
|
21
|
+
export declare function find_<I extends unknown = unknown>(
|
|
22
|
+
fn:(val:I, idx:number)=>I
|
|
23
|
+
):(a:readonly I[])=>I|undefined
|
|
24
|
+
export declare function maybe_find_<I extends unknown = unknown>(
|
|
25
|
+
fn:(val:I, idx:number)=>I
|
|
26
|
+
):(maybe_a:wrap_a_T2<I>)=>I|undefined
|
|
27
|
+
export {
|
|
28
|
+
find_ as _find,
|
|
29
|
+
maybe_find_ as _maybe_find,
|
|
30
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** @typedef {import('../wrap_a/index.d.ts').wrap_a_T2} */
|
|
2
|
+
/**
|
|
3
|
+
* Returns first item in `a` where `fn(a[idx], idx)` is truthy.
|
|
4
|
+
* @param {wrap_a_T2}a
|
|
5
|
+
* @param {(val:unknown, idx:number)=>unknown}fn
|
|
6
|
+
* @returns {unknown}
|
|
7
|
+
*/
|
|
8
|
+
export function find(a, fn) {
|
|
9
|
+
for (let idx = 0; idx < a.length; idx++) {
|
|
10
|
+
const val = a[idx]
|
|
11
|
+
const map_val = fn(val, idx)
|
|
12
|
+
if (map_val) return val
|
|
13
|
+
}
|
|
14
|
+
return undefined
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @param maybe_a{wrap_a_T2}
|
|
18
|
+
* @param fn{(val:unknown, idx:number)=>unknown}
|
|
19
|
+
* @param or{unknown}
|
|
20
|
+
* @returns {unknown}
|
|
21
|
+
*/
|
|
22
|
+
export function maybe_find(
|
|
23
|
+
maybe_a,
|
|
24
|
+
fn,
|
|
25
|
+
or = null
|
|
26
|
+
) {
|
|
27
|
+
if (!maybe_a) return or
|
|
28
|
+
return find(maybe_a, fn)
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns function that returns value from [find](#find) with `fn` argument.
|
|
32
|
+
* @param fn{(val:unknown, idx:number)=>unknown}
|
|
33
|
+
* @returns {(a:unknown[])=>unknown}
|
|
34
|
+
*/
|
|
35
|
+
export function find_(fn) {
|
|
36
|
+
return (a)=>find(a, fn)
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
find_ as find_fn,
|
|
40
|
+
find_ as _find,
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @param fn{(val:unknown, idx:number)=>unknown}
|
|
44
|
+
* @returns {(maybe_a:wrap_a_T2)=>unknown}
|
|
45
|
+
*/
|
|
46
|
+
export function maybe_find_(fn) {
|
|
47
|
+
return (maybe_a)=>maybe_find(maybe_a, fn)
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
maybe_find_ as _maybe_find,
|
|
51
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the first item in `a`.
|
|
3
|
+
*/
|
|
4
|
+
export declare function first_<
|
|
5
|
+
I extends unknown = unknown
|
|
6
|
+
>(a:readonly I[]):I|undefined
|
|
7
|
+
export declare function maybe_first_<
|
|
8
|
+
I extends unknown = unknown,
|
|
9
|
+
Or = null
|
|
10
|
+
>(
|
|
11
|
+
maybe_a:readonly I[]|undefined,
|
|
12
|
+
or?:Or
|
|
13
|
+
):I|Or
|
|
14
|
+
export {
|
|
15
|
+
first_ as _first,
|
|
16
|
+
maybe_first_ as _maybe_first,
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the first item in `a`.
|
|
3
|
+
* @param {unknown[]}a
|
|
4
|
+
* @returns {unknown}
|
|
5
|
+
*/
|
|
6
|
+
export function first_(a) {
|
|
7
|
+
return a[0]
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @param maybe_a{unknown[]|undefined}
|
|
11
|
+
* @param or{unknown[]|null|undefined}
|
|
12
|
+
* @returns {unknown[]|null|undefined}
|
|
13
|
+
*/
|
|
14
|
+
export function maybe_first_(
|
|
15
|
+
maybe_a,
|
|
16
|
+
or = null
|
|
17
|
+
) {
|
|
18
|
+
return maybe_a ? first_(maybe_a) : or
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
first_ as _first,
|
|
22
|
+
maybe_first_ as _maybe_first,
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { wrap_a_T2 } from '../wrap_a/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* Flattens the a & it's children into an array without chunks
|
|
4
|
+
*/
|
|
5
|
+
export declare function flatten<
|
|
6
|
+
I extends unknown = unknown
|
|
7
|
+
>(a:wrap_a_T2<I>):I[]
|
|
8
|
+
export declare function maybe_flatten<
|
|
9
|
+
I extends unknown = unknown, Or = null
|
|
10
|
+
>(
|
|
11
|
+
in_a:wrap_a_T2<I>,
|
|
12
|
+
or?:Or
|
|
13
|
+
):I[]|Or
|
|
14
|
+
export { flatten as flatten__a1, }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { isArray } from '../isArray/index.js'
|
|
2
|
+
import { wrap_concat } from '../wrap_concat/index.js'
|
|
3
|
+
/** @typedef {import('../wrap_a/index.d.ts').wrap_a_T2} */
|
|
4
|
+
/**
|
|
5
|
+
* Flattens the a & it's children into an array without chunks
|
|
6
|
+
* @param {wrap_a_T2}a
|
|
7
|
+
* @returns {unknown[]}
|
|
8
|
+
*/
|
|
9
|
+
export function flatten(a) {
|
|
10
|
+
return (
|
|
11
|
+
a.reduce((previous_val, current_val)=>
|
|
12
|
+
wrap_concat(
|
|
13
|
+
previous_val,
|
|
14
|
+
...isArray(current_val)
|
|
15
|
+
? flatten(current_val)
|
|
16
|
+
: [current_val]),
|
|
17
|
+
[]))
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param in_a{wrap_a_T2}
|
|
21
|
+
* @param or{unknown[]|null|undefined}
|
|
22
|
+
* @returns {unknown[]|null|undefined}
|
|
23
|
+
*/
|
|
24
|
+
export function maybe_flatten(in_a, or = null) {
|
|
25
|
+
if (!in_a) return or
|
|
26
|
+
return flatten(in_a)
|
|
27
|
+
}
|
|
28
|
+
export { flatten as flatten__a1, }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { curry_ } from '../curry/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* @param append{import('../resolver_curry').append_current_T}
|
|
4
|
+
* @returns {import('../resolver_curry').resolver_curry_T<unknown>}
|
|
5
|
+
*/
|
|
6
|
+
export function flip(append) {
|
|
7
|
+
return curry_((local, arg_a)=>
|
|
8
|
+
Array.prototype.unshift.apply(local, arg_a))(append)
|
|
9
|
+
}
|
|
10
|
+
export { flip as curry__flip }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { nullish } from '../nullish/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* Averages the items in passed in array
|
|
4
|
+
*/
|
|
5
|
+
export declare function fn_mean_<I = number>(
|
|
6
|
+
a:readonly I[],
|
|
7
|
+
numerator_:(val:I)=>number|nullish
|
|
8
|
+
):number
|
|
9
|
+
export {
|
|
10
|
+
fn_mean_ as fn_avg,
|
|
11
|
+
fn_mean_ as _fn_avg,
|
|
12
|
+
fn_mean_ as _avg__fn,
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Averages the items in passed in array
|
|
3
|
+
*/
|
|
4
|
+
export function fn_mean_(a, numerator_) {
|
|
5
|
+
if (!a) return null
|
|
6
|
+
let sum = 0
|
|
7
|
+
let count = 0
|
|
8
|
+
for (let i = 0; i < a.length; i++) {
|
|
9
|
+
const val = numerator_(a[i])
|
|
10
|
+
if (val != null) {
|
|
11
|
+
sum += val
|
|
12
|
+
count++
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return sum / count
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
fn_mean_ as fn_avg,
|
|
19
|
+
fn_mean_ as _fn_avg,
|
|
20
|
+
fn_mean_ as _avg__fn,
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { test } from 'uvu'
|
|
2
|
+
import { equal } from 'uvu/assert'
|
|
3
|
+
import { fn_mean_ } from '../fn_mean/index.js'
|
|
4
|
+
test('fn_mean_', ()=>{
|
|
5
|
+
equal(
|
|
6
|
+
fn_mean_([null, 1, 2, null, null, 3],
|
|
7
|
+
val=>
|
|
8
|
+
val == null
|
|
9
|
+
? null
|
|
10
|
+
: val * 2),
|
|
11
|
+
4)
|
|
12
|
+
})
|
|
13
|
+
test.run()
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export function fn_pipe<A>(o:A):A
|
|
2
|
+
export function fn_pipe<A, B>(o:A, _0:($:A)=>B):B
|
|
3
|
+
export function fn_pipe<A, B, C>(o:A, _0:($:A)=>B, _1:($:B)=>C):C
|
|
4
|
+
export function fn_pipe<A, B, C, D>(o:A, _0:($:A)=>B, _1:($:B)=>C, _2:($:C)=>D):D
|
|
5
|
+
export function fn_pipe<A, B, C, D, E>(o:A, _0:($:A)=>B, _1:($:B)=>C, _2:($:C)=>D, _3:($:D)=>E):E
|
|
6
|
+
export function fn_pipe<A, B, C, D, E, F>(
|
|
7
|
+
o:A,
|
|
8
|
+
_0:($:A)=>B,
|
|
9
|
+
_1:($:B)=>C,
|
|
10
|
+
_2:($:C)=>D,
|
|
11
|
+
_3:($:D)=>E,
|
|
12
|
+
_4:($:E)=>F
|
|
13
|
+
):F
|
|
14
|
+
export function fn_pipe<A, B, C, D, E, F, G>(
|
|
15
|
+
o:A,
|
|
16
|
+
_0:($:A)=>B,
|
|
17
|
+
_1:($:B)=>C,
|
|
18
|
+
_2:($:C)=>D,
|
|
19
|
+
_3:($:D)=>E,
|
|
20
|
+
_4:($:E)=>F,
|
|
21
|
+
_5:($:F)=>G
|
|
22
|
+
):G
|
|
23
|
+
export function fn_pipe<A, B, C, D, E, F, G, H>(
|
|
24
|
+
o:A,
|
|
25
|
+
_0:($:A)=>B,
|
|
26
|
+
_1:($:B)=>C,
|
|
27
|
+
_2:($:C)=>D,
|
|
28
|
+
_3:($:D)=>E,
|
|
29
|
+
_4:($:E)=>F,
|
|
30
|
+
_5:($:F)=>G,
|
|
31
|
+
_6:($:G)=>H
|
|
32
|
+
):H
|
|
33
|
+
export function fn_pipe<A, B, C, D, E, F, G, H, I>(
|
|
34
|
+
o:A,
|
|
35
|
+
_0:($:A)=>B,
|
|
36
|
+
_1:($:B)=>C,
|
|
37
|
+
_2:($:C)=>D,
|
|
38
|
+
_3:($:D)=>E,
|
|
39
|
+
_4:($:E)=>F,
|
|
40
|
+
_5:($:F)=>G,
|
|
41
|
+
_6:($:G)=>H,
|
|
42
|
+
_7:($:H)=>I
|
|
43
|
+
):I
|
|
44
|
+
export function fn_pipe<A, B, C, D, E, F, G, H, I, J>(
|
|
45
|
+
o:A,
|
|
46
|
+
_0:($:A)=>B,
|
|
47
|
+
_1:($:B)=>C,
|
|
48
|
+
_2:($:C)=>D,
|
|
49
|
+
_3:($:D)=>E,
|
|
50
|
+
_4:($:E)=>F,
|
|
51
|
+
_5:($:F)=>G,
|
|
52
|
+
_6:($:G)=>H,
|
|
53
|
+
_7:($:H)=>I,
|
|
54
|
+
_8:($:I)=>J
|
|
55
|
+
):J
|
|
56
|
+
export function fn_pipe<A, B, C, D, E, F, G, H, I, J, K>(
|
|
57
|
+
o:A,
|
|
58
|
+
_0:($:A)=>B,
|
|
59
|
+
_1:($:B)=>C,
|
|
60
|
+
_2:($:C)=>D,
|
|
61
|
+
_3:($:D)=>E,
|
|
62
|
+
_4:($:E)=>F,
|
|
63
|
+
_5:($:F)=>G,
|
|
64
|
+
_6:($:G)=>H,
|
|
65
|
+
_7:($:H)=>I,
|
|
66
|
+
_8:($:I
|
|
67
|
+
)=>J, ...args:(($:any)=>any)[]):K
|
|
68
|
+
export {
|
|
69
|
+
fn_pipe as _p_,
|
|
70
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { test } from 'uvu'
|
|
2
|
+
import { equal, is } from 'uvu/assert'
|
|
3
|
+
import { _p_, fn_pipe } from '../fn_pipe/index.js'
|
|
4
|
+
test('fn_pipe|synchronous', ()=>{
|
|
5
|
+
const o = {}
|
|
6
|
+
is(o, fn_pipe(o, $=>$))
|
|
7
|
+
equal({ foo: 'bar', o }, fn_pipe(o, $=>$, o=>({ foo: 'bar', o })))
|
|
8
|
+
is(o, _p_(o, $=>$))
|
|
9
|
+
equal({ foo: 'bar', o }, _p_(o, $=>$, o=>({ foo: 'bar', o })))
|
|
10
|
+
})
|
|
11
|
+
test('fn_pipe|async', async ()=>{
|
|
12
|
+
const o = { one: 1 }
|
|
13
|
+
equal({ one: 1, foo: 'bar', baz: 'quux' },
|
|
14
|
+
await fn_pipe(o, async ()=>({ ...o, foo: 'bar' }), $=>$.then($=>({ ...$, baz: 'quux' }))))
|
|
15
|
+
equal({ one: 1, foo: 'bar', baz: 'quux' },
|
|
16
|
+
await _p_(o, async ()=>({ ...o, foo: 'bar' }), $=>$.then($=>({ ...$, baz: 'quux' }))))
|
|
17
|
+
})
|
|
18
|
+
test.run()
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { nullish } from '../nullish/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* Returns the sum of the values mapped by numerator_
|
|
4
|
+
*/
|
|
5
|
+
export declare function fn_sum_<I = number>(
|
|
6
|
+
a:readonly I[],
|
|
7
|
+
numerator_:(val:I)=>(number|nullish)
|
|
8
|
+
):number
|
|
9
|
+
export {
|
|
10
|
+
fn_sum_ as _fn_sum,
|
|
11
|
+
fn_sum_ as _sum__fn,
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the sum of the values mapped by numerator_
|
|
3
|
+
* @param {unknown[]}a
|
|
4
|
+
* @param {(val:I)=>(number|nullish)}numerator_
|
|
5
|
+
*/
|
|
6
|
+
export function fn_sum_(a, numerator_) {
|
|
7
|
+
let sum = 0
|
|
8
|
+
if (!a) return sum
|
|
9
|
+
for (let i = 0; i < a.length; i++) {
|
|
10
|
+
sum += numerator_(a[i])
|
|
11
|
+
}
|
|
12
|
+
return sum
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
fn_sum_ as _fn_sum,
|
|
16
|
+
fn_sum_ as _sum__fn,
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { test } from 'uvu'
|
|
2
|
+
import { equal } from 'uvu/assert'
|
|
3
|
+
import { fn_sum_ } from '../fn_sum/index.js'
|
|
4
|
+
test('fn_sum_', ()=>{
|
|
5
|
+
equal(
|
|
6
|
+
fn_sum_([null, 1, 2, null, null, 3],
|
|
7
|
+
val=>
|
|
8
|
+
val == null
|
|
9
|
+
? null
|
|
10
|
+
: val * 2),
|
|
11
|
+
12)
|
|
12
|
+
})
|
|
13
|
+
test.run()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function format_date_prose(date?:Date):string
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { month_a } from '../month_a/index.js'
|
|
2
|
+
import { pad2 } from '../pad2/index.js'
|
|
3
|
+
/**
|
|
4
|
+
* @param {Date}[date]
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export function format_date_prose(date) {
|
|
8
|
+
date = date || new Date()
|
|
9
|
+
return `${month_a[date.getMonth()]} ${pad2(date.getDate())}, ${date.getFullYear()}`
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function format_utc_date_prose(date?:Date):string
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { month_a } from '../month_a/index.js'
|
|
2
|
+
import { pad2 } from '../pad2/index.js'
|
|
3
|
+
/**
|
|
4
|
+
* @param {Date}[date]
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export function format_utc_date_prose(date) {
|
|
8
|
+
date = date || new Date()
|
|
9
|
+
return `${month_a[date.getUTCMonth()]} ${pad2(date.getUTCDate())}, ${date.getUTCFullYear()}`
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { test } from 'uvu'
|
|
2
|
+
import { equal } from 'uvu/assert'
|
|
3
|
+
import { globalThis__prop__ensure } from '../globalThis__prop__ensure/index.js'
|
|
4
|
+
const test_fn_sym = Symbol.for('test_fn_sym')
|
|
5
|
+
test('globalThis__prop__ensure|string', ()=>{
|
|
6
|
+
const test__globalThis = globalThis as test__globalThis_T
|
|
7
|
+
equal(test__globalThis.test_fn_str, undefined)
|
|
8
|
+
equal(
|
|
9
|
+
globalThis__prop__ensure('test_fn_str', ()=>'test'),
|
|
10
|
+
'test')
|
|
11
|
+
equal(test__globalThis.test_fn_str, 'test')
|
|
12
|
+
})
|
|
13
|
+
test('globalThis__prop__ensure|symbol', ()=>{
|
|
14
|
+
const test__globalThis = globalThis as test__globalThis_T
|
|
15
|
+
equal(test__globalThis[test_fn_sym], undefined)
|
|
16
|
+
equal(globalThis__prop__ensure(test_fn_sym, ()=>'test'), 'test')
|
|
17
|
+
equal(test__globalThis[test_fn_sym], 'test')
|
|
18
|
+
})
|
|
19
|
+
type test__globalThis_T = typeof globalThis&{
|
|
20
|
+
test_fn_str:string
|
|
21
|
+
[test_fn_sym]:string
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns Array of values `>= 0` in `val_a`.
|
|
3
|
+
* @param val_a{number[]}
|
|
4
|
+
* @returns {number[]}
|
|
5
|
+
*/
|
|
6
|
+
export function gte_0_a_(val_a) {
|
|
7
|
+
/** @type {number[]} */
|
|
8
|
+
const gte_0_a = []
|
|
9
|
+
for (let i = 0; i < val_a.length; i++) {
|
|
10
|
+
const val = val_a[i]
|
|
11
|
+
if (val >= 0) {
|
|
12
|
+
gte_0_a.push(val)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return gte_0_a
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
gte_0_a_ as gte_0_a1_fn,
|
|
19
|
+
gte_0_a_ as _gte_0_a1,
|
|
20
|
+
gte_0_a_ as _a1__gte__0,
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns object with picked values,
|
|
3
|
+
* not including inherited property values (i.e. if hasOwnProperty is false).
|
|
4
|
+
*/
|
|
5
|
+
export declare function hasOwnProperty_pick<
|
|
6
|
+
I extends unknown = unknown,
|
|
7
|
+
O = I
|
|
8
|
+
>(val:I, ...key_a:string[]):O|undefined
|
|
9
|
+
export { hasOwnProperty_pick as pick__hasOwnProperty }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns object with picked values,
|
|
3
|
+
* not including inherited property values (i.e. if hasOwnProperty is false).
|
|
4
|
+
* @param {unknown}val
|
|
5
|
+
* @param {string}key_a
|
|
6
|
+
* @returns {unknown}}
|
|
7
|
+
*/
|
|
8
|
+
export function hasOwnProperty_pick(val, ...key_a) {
|
|
9
|
+
if (!val) return
|
|
10
|
+
let memo = {}
|
|
11
|
+
for (let i = 0; i < key_a.length; i++) {
|
|
12
|
+
const key = key_a[i]
|
|
13
|
+
if (val.hasOwnProperty(key)) memo[key] = val[key]
|
|
14
|
+
}
|
|
15
|
+
return memo
|
|
16
|
+
}
|
|
17
|
+
export { hasOwnProperty_pick as pick__hasOwnProperty }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if obj has given in_key, false otherwise.
|
|
3
|
+
* If no in_key given, returns true if obj has any in_key, false otherwise.
|
|
4
|
+
*/
|
|
5
|
+
export declare function has_key(obj:object, in_key?:symbol):boolean
|
|
6
|
+
export { has_key as has__key }
|
|
7
|
+
/**
|
|
8
|
+
* If a key is given, returns boolean indicitating if the given key is a member of the obj.
|
|
9
|
+
* If no key is given, returns boolean indicitating if the obj has any key.
|
|
10
|
+
*/
|
|
11
|
+
export declare function has_key_(obj:object, in_key?:string):boolean
|
|
12
|
+
export {
|
|
13
|
+
has_key_ as _has_key,
|
|
14
|
+
has_key_ as _has__key,
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { keys } from '../keys/index.js'
|
|
2
|
+
const no_key_arg_symbol = Symbol('no_key_arg')
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if obj has given in_key; false otherwise.
|
|
5
|
+
* If no in_key given, returns true if obj has any in_key; false otherwise.
|
|
6
|
+
* @param {object}obj
|
|
7
|
+
* @param {symbol}[in_key]
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export function has_key(obj, in_key = no_key_arg_symbol) {
|
|
11
|
+
if (in_key === no_key_arg_symbol) {
|
|
12
|
+
for (let _ in obj) {
|
|
13
|
+
return true
|
|
14
|
+
}
|
|
15
|
+
} else {
|
|
16
|
+
for (let key in obj) {
|
|
17
|
+
if (in_key.toString() === key.toString()) return true
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return false
|
|
21
|
+
}
|
|
22
|
+
export { has_key as has__key }
|
|
23
|
+
/**
|
|
24
|
+
* If a key is given, returns boolean of indicitating if the given key is a member of the obj.
|
|
25
|
+
* If no key is given, returns boolean of indicitating if the obj has any key.
|
|
26
|
+
* @param {object}obj
|
|
27
|
+
* @param {boolean}[in_key]
|
|
28
|
+
* @returns {boolean}
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
export function has_key_(obj, in_key) {
|
|
32
|
+
const $keys = keys(obj)
|
|
33
|
+
return in_key ? !!~$keys.indexOf(in_key) : !!$keys.length
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
has_key_ as _has_key,
|
|
37
|
+
has_key_ as _has__key,
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if argument is an array with more than one item
|
|
3
|
+
*/
|
|
4
|
+
export declare function has_multiple_(a:readonly unknown[]):boolean
|
|
5
|
+
export {
|
|
6
|
+
has_multiple_ as _has_multiple,
|
|
7
|
+
has_multiple_ as _has__multiple,
|
|
8
|
+
has_multiple_ as _has__multiple__a1,
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { a_length_ } from '../a_length/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if argument is an array with more than one item
|
|
4
|
+
* @param {unknown[]}a
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
export function has_multiple_(a) {
|
|
8
|
+
return a_length_(a) > 1
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
has_multiple_ as _has_multiple,
|
|
12
|
+
has_multiple_ as _has__multiple,
|
|
13
|
+
has_multiple_ as _has__multiple__a1,
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { slice_arg_a_fn_T, slice_arg_a_T } from '../slice_arg_a/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* Returns a function where the first `count` arguments are sent to the wrapped function.
|
|
4
|
+
*/
|
|
5
|
+
export declare function head_arg_a_<
|
|
6
|
+
I extends unknown = unknown
|
|
7
|
+
>(fn:slice_arg_a_fn_T<I>, count?:number):slice_arg_a_T<I>
|
|
8
|
+
export {
|
|
9
|
+
head_arg_a_ as head_arg_a1_fn,
|
|
10
|
+
head_arg_a_ as _head_arg_a1,
|
|
11
|
+
head_arg_a_ as _arg_a1__head,
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { slice_arg_a_ } from '../slice_arg_a/index.js'
|
|
2
|
+
/**
|
|
3
|
+
* Returns a function where the first `count` arguments are sent to the wrapped function.
|
|
4
|
+
* @param {import('../slice_arg_a/index.js').slice_arg_a_fn_T}fn
|
|
5
|
+
* @param {number}[count]
|
|
6
|
+
* @returns {import('../slice_arg_a_/index.js').slice_arg_a_T}
|
|
7
|
+
*/
|
|
8
|
+
export function head_arg_a_(fn, count = 1) {
|
|
9
|
+
return slice_arg_a_(fn, 0, count)
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
head_arg_a_ as head_arg_a1_fn,
|
|
13
|
+
head_arg_a_ as _head_arg_a1,
|
|
14
|
+
head_arg_a_ as _arg_a1__head,
|
|
15
|
+
}
|