ctx-core 5.1.0 → 5.2.0
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/CACHE_VERSION/index.d.ts +10 -0
- package/all/CACHE_VERSION/index.js +14 -0
- package/all/NODE_ENV/index.d.ts +10 -0
- package/all/NODE_ENV/index.js +14 -0
- package/all/Request/index.js +2 -1
- package/all/Response/index.js +1 -1
- package/all/VERSION/index.d.ts +7 -0
- package/all/VERSION/index.js +12 -0
- package/all/add/index.js +1 -1
- package/all/all_union_a/index.js +1 -1
- package/all/and/index.js +2 -1
- package/all/andand_or/index.js +2 -1
- package/all/andandfn/index.js +4 -3
- package/all/apply/index.js +4 -2
- package/all/arg_a__pick/index.d.ts +6 -0
- package/all/arg_a__pick/index.js +16 -0
- package/all/arg_i0_a/index.js +3 -2
- package/all/assign_fn_key_a/index.js +1 -1
- package/all/bad_gateway/index.js +2 -1
- package/all/bad_request/index.js +1 -1
- package/all/be/index.js +3 -2
- package/all/be_/index.d.ts +38 -3
- package/all/be_/index.js +52 -14
- package/all/be_/index.test.ts +191 -90
- package/all/be_lock_memosig_triple/index.test.ts +6 -6
- package/all/be_memo_pair/index.test.ts +4 -4
- package/all/be_memosig_triple/index.test.ts +6 -6
- package/all/be_sig_triple/index.test.ts +4 -4
- package/all/binary_sort_rank/index.js +2 -1
- package/all/bind_apply/index.js +4 -4
- package/all/bind_call/index.js +1 -1
- package/all/bind_map_apply/index.js +1 -1
- package/all/bind_map_call/index.js +4 -5
- package/all/btoa/index.js +2 -1
- package/all/btoa_Uint32Array/index.js +2 -1
- package/all/call/index.js +2 -1
- package/all/call_assign/index.js +2 -1
- package/all/chain/index.js +3 -2
- package/all/clone_assign_fn_key_a/index.js +2 -1
- package/all/color_hsv_phi_rgb_a/index.js +3 -2
- package/all/color_invert_rgb_a/index.js +3 -2
- package/all/compact_a_ctx/index.js +2 -1
- package/all/compare/index.js +2 -1
- package/all/compose/index.js +5 -5
- package/all/concat_truthy_a/index.js +4 -2
- package/all/console__error/index.js +2 -1
- package/all/crypto__sign/index.js +2 -1
- package/all/currency_str/index.js +2 -1
- package/all/currency_symbol/index.js +2 -1
- package/all/curry/index.js +2 -2
- package/all/date/index.js +1 -1
- package/all/default_arg_a/index.d.ts +11 -0
- package/all/default_arg_a/index.js +41 -0
- package/all/dfn_flag_r/index.d.ts +8 -0
- package/all/dfn_flag_r/index.js +24 -0
- package/all/difference_a/index.js +4 -2
- package/all/each/index.js +2 -1
- package/all/ensure__refresh/index.js +3 -2
- package/all/eq/index.js +5 -3
- package/all/eql_fn_a/index.js +1 -1
- package/all/error__print/index.js +4 -2
- package/all/error_o/index.js +4 -2
- package/all/falsy__none/index.js +2 -1
- package/all/fetch/index.js +2 -1
- package/all/fetch__template_pair/index.js +2 -1
- package/all/fetch_method/index.js +2 -1
- package/all/fetch_response_pair/index.js +4 -2
- package/all/filter/index.js +2 -1
- package/all/filter_o/index.js +3 -2
- package/all/find/index.js +1 -1
- package/all/flag_a/index.d.ts +6 -0
- package/all/flag_a/index.js +13 -0
- package/all/flag_r/index.d.ts +8 -0
- package/all/flag_r/index.js +34 -0
- package/all/flag_r__pick/index.d.ts +11 -0
- package/all/flag_r__pick/index.js +31 -0
- package/all/flag_r_arg_a/index.d.ts +9 -0
- package/all/flag_r_arg_a/index.js +27 -0
- package/all/flag_r_param_name/index.d.ts +9 -0
- package/all/flag_r_param_name/index.js +24 -0
- package/all/flag_regex/index.d.ts +1 -0
- package/all/flag_regex/index.js +1 -0
- package/all/flatten/index.js +7 -7
- package/all/flip/index.js +3 -2
- package/all/head_arg_a/index.js +3 -2
- package/all/headers/index.js +1 -1
- package/all/hex__digest/index.js +2 -1
- package/all/hmac/index.js +2 -1
- package/all/hmac_key/index.js +2 -1
- package/all/html/index.d.ts +0 -1
- package/all/html/index.js +0 -4
- package/all/html_attr/index.d.ts +0 -2
- package/all/html_attr/index.js +0 -2
- package/all/html_attrs/index.d.ts +0 -1
- package/all/html_attrs/index.js +0 -1
- package/all/html_class/index.d.ts +0 -2
- package/all/html_class/index.js +0 -2
- package/all/html_dataset__data_attrs/index.d.ts +0 -1
- package/all/html_dataset__data_attrs/index.js +0 -1
- package/all/html_style/index.d.ts +0 -2
- package/all/html_style/index.js +0 -2
- package/all/html_style__assign/index.d.ts +2 -6
- package/all/html_style__assign/index.js +0 -5
- package/all/html_styles_o/index.d.ts +0 -5
- package/all/html_styles_o/index.js +0 -5
- package/all/http_error/index.js +4 -2
- package/all/idx/index.js +2 -1
- package/all/idx_filter/index.js +2 -2
- package/all/idx_key_r/index.js +5 -4
- package/all/idx_reject/index.js +1 -1
- package/all/idx_sort_a__sort_idx_o/index.js +2 -1
- package/all/import_meta_env/index.d.ts +10 -0
- package/all/import_meta_env/index.js +18 -0
- package/all/index.d.ts +22 -0
- package/all/index.js +22 -0
- package/all/intersection_a/index.js +4 -2
- package/all/intersection_by/index.js +2 -1
- package/all/invalid_state/index.js +2 -2
- package/all/is_development/index.d.ts +6 -0
- package/all/is_development/index.js +9 -0
- package/all/is_production/index.d.ts +9 -0
- package/all/is_production/index.js +12 -0
- package/all/is_staging/index.d.ts +9 -0
- package/all/is_staging/index.js +12 -0
- package/all/item_r_idx/index.js +2 -1
- package/all/js_html/index.d.ts +0 -4
- package/all/js_html/index.js +0 -4
- package/all/left_and/index.js +2 -1
- package/all/left_or/index.js +2 -1
- package/all/line__parse/index.js +2 -3
- package/all/line__transform_stream/index.js +1 -1
- package/all/links_html/index.d.ts +0 -5
- package/all/links_html/index.js +0 -4
- package/all/many_andand/index.js +4 -2
- package/all/many_andand_or/index.js +6 -3
- package/all/map/index.js +1 -1
- package/all/map_andand/index.js +1 -1
- package/all/map_andand_or/index.js +3 -2
- package/all/map_andandfn/index.js +2 -1
- package/all/map_apply/index.js +2 -1
- package/all/map_call/index.js +3 -2
- package/all/map_find/index.js +1 -1
- package/all/map_obj/index.js +3 -2
- package/all/map_obj_andand/index.js +1 -1
- package/all/missing_argument/index.js +3 -2
- package/all/missing_env__throw/index.d.ts +8 -0
- package/all/missing_env__throw/index.js +19 -0
- package/all/money_str/index.js +2 -2
- package/all/neq/index.js +2 -1
- package/all/not/index.js +4 -3
- package/all/not_found/index.js +1 -1
- package/all/nullish__none/index.js +1 -1
- package/all/nullish__not_all/index.js +1 -1
- package/all/number__count/index.js +2 -2
- package/all/o_a_present/index.js +1 -1
- package/all/one_andand/index.js +2 -1
- package/all/one_andand_or/index.js +3 -2
- package/all/or/index.js +2 -3
- package/all/or_null/index.js +2 -1
- package/all/param_dfn/index.d.ts +1 -0
- package/all/param_dfn/index.js +1 -0
- package/all/param_dfn_a_reducer/index.d.ts +9 -0
- package/all/param_dfn_a_reducer/index.js +12 -0
- package/all/param_dfn_split_regex/index.d.ts +1 -0
- package/all/param_dfn_split_regex/index.js +1 -0
- package/all/param_name_r_param_val_a/index.d.ts +11 -0
- package/all/param_name_r_param_val_a/index.js +29 -0
- package/all/param_r/index.d.ts +16 -0
- package/all/param_r/index.js +33 -0
- package/all/param_r/index.test.ts +28 -0
- package/all/parseFloat_andor/index.d.ts +3 -2
- package/all/parseFloat_andor/index.test.ts +1 -1
- package/all/promise_o/index.js +2 -1
- package/all/rank/index.js +2 -1
- package/all/reduce/index.js +1 -1
- package/all/reject/index.js +1 -1
- package/all/response_o/index.js +2 -3
- package/all/right_and/index.js +2 -1
- package/all/right_or/index.js +2 -1
- package/all/slice_arg_a/index.js +3 -2
- package/all/slice_arg_spread_a/index.js +3 -2
- package/all/sort/index.js +1 -1
- package/all/sort_a/index.js +1 -1
- package/all/sort_idx_a/index.js +1 -1
- package/all/sort_idx_o/index.js +5 -4
- package/all/sort_val_a/index.js +1 -1
- package/all/sort_val_a__transition_idx_a/index.js +1 -3
- package/all/spread/index.js +1 -1
- package/all/spread_slice/index.js +2 -1
- package/all/tap/index.js +1 -1
- package/all/tempfile_path/index.test.ts +1 -1
- package/all/unauthorized/index.js +1 -1
- package/all/unformat_currency_str/index.js +1 -2
- package/all/union_a/index.js +3 -2
- package/all/union_by/index.js +1 -1
- package/all/url__join/index.js +2 -1
- package/all/weak_r/index.js +1 -1
- package/all/wrap_a/index.js +8 -5
- package/all/wrap_aa/index.js +3 -2
- package/all/wrap_concat/index.js +4 -3
- package/all/zip_with/index.js +1 -1
- package/cli-args/index.d.ts +14 -0
- package/cli-args/index.js +14 -0
- package/env/index.d.ts +8 -0
- package/env/index.js +8 -0
- package/html/index.d.ts +31 -0
- package/html/index.js +31 -0
- package/package.json +13 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const flag_regex:RegExp
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const flag_regex = /^--?(.*)/
|
package/all/flatten/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/// <reference types="../wrap_a/index.d.ts" />
|
|
1
2
|
import { isArray } from '../isArray/index.js'
|
|
2
3
|
import { wrap_concat } from '../wrap_concat/index.js'
|
|
3
|
-
/** @typedef {import('../wrap_a/index.d.ts').wrap_a_T2} */
|
|
4
4
|
/**
|
|
5
5
|
* Flattens the a & it's children into an array without chunks
|
|
6
6
|
* @param {wrap_a_T2}a
|
|
@@ -9,12 +9,12 @@ import { wrap_concat } from '../wrap_concat/index.js'
|
|
|
9
9
|
export function flatten(a) {
|
|
10
10
|
return (
|
|
11
11
|
a.reduce((previous_val, current_val)=>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
wrap_concat(
|
|
13
|
+
previous_val,
|
|
14
|
+
...isArray(current_val)
|
|
15
|
+
? flatten(current_val)
|
|
16
|
+
: [current_val]),
|
|
17
|
+
[]))
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* @param in_a{wrap_a_T2}
|
package/all/flip/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="../resolver_curry/index.d.ts" />
|
|
1
2
|
import { curry_ } from '../curry/index.js'
|
|
2
3
|
/**
|
|
3
|
-
* @param append{
|
|
4
|
-
* @returns {
|
|
4
|
+
* @param append{append_current_T}
|
|
5
|
+
* @returns {resolver_curry_T<unknown>}
|
|
5
6
|
*/
|
|
6
7
|
export function flip(append) {
|
|
7
8
|
return curry_((local, arg_a)=>
|
package/all/head_arg_a/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="../slice_arg_a/index.d.ts" />
|
|
1
2
|
import { slice_arg_a_ } from '../slice_arg_a/index.js'
|
|
2
3
|
/**
|
|
3
4
|
* Returns a function where the first `count` arguments are sent to the wrapped function.
|
|
4
|
-
* @param {
|
|
5
|
+
* @param {slice_arg_a_fn_T}fn
|
|
5
6
|
* @param {number}[count]
|
|
6
|
-
* @returns {
|
|
7
|
+
* @returns {slice_arg_a_T}
|
|
7
8
|
*/
|
|
8
9
|
export function head_arg_a_(fn, count = 1) {
|
|
9
10
|
return slice_arg_a_(fn, 0, count)
|
package/all/headers/index.js
CHANGED
package/all/hex__digest/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="../hex__digest/index.d.ts" />
|
|
1
2
|
import { crypto_ } from '../crypto/index.js'
|
|
2
3
|
/**
|
|
3
|
-
* @param {
|
|
4
|
+
* @param {digest__algorithm_T}algorithm
|
|
4
5
|
* @param {string|BufferSource}message
|
|
5
6
|
* @returns {Promise<string>}
|
|
6
7
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest}
|
package/all/hmac/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="../hmac/index.d.ts" />
|
|
1
2
|
import { buffer__hex_ } from '../buffer__hex/index.js'
|
|
2
3
|
import { crypto__sign } from '../crypto__sign/index.js'
|
|
3
4
|
import { hmac_key_ } from '../hmac_key/index.js'
|
|
4
5
|
/**
|
|
5
|
-
* @param {
|
|
6
|
+
* @param {digest__algorithm_T}algorithm
|
|
6
7
|
* @param {string|BufferSource|CryptoKey}key
|
|
7
8
|
* @param {string|BufferSource}data
|
|
8
9
|
* @returns {Promise<string>}
|
package/all/hmac_key/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="../hmac_key/index.d.ts" />
|
|
1
2
|
import { crypto_ } from '../crypto/index.js'
|
|
2
3
|
/**
|
|
3
|
-
* @param {
|
|
4
|
+
* @param {digest__algorithm_T}algorithm
|
|
4
5
|
* @param {string|BufferSource}key
|
|
5
6
|
* @returns {Promise<CryptoKey>}
|
|
6
7
|
* @see https://lukasmurdock.com/web-hmac/
|
package/all/html/index.d.ts
CHANGED
package/all/html/index.js
CHANGED
package/all/html_attr/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { nullish } from '../nullish/index.js'
|
|
2
2
|
export declare function html_attr_(key:string, val:string):string
|
|
3
|
-
export { html_attr_ as attr_ }
|
|
4
3
|
export declare function raw__html_attr_(key:string, val:string):string
|
|
5
|
-
export { raw__html_attr_ as raw__attr_ }
|
|
6
4
|
export type html_attr_def_T = Record<string, unknown>|string|string[]|nullish
|
|
7
5
|
export type attr_def_T = html_attr_def_T
|
|
8
6
|
|
package/all/html_attr/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import { html_ } from '../html/index.js'
|
|
|
8
8
|
export function html_attr_(key, val) {
|
|
9
9
|
return key + '="' + html_(val) + '"'
|
|
10
10
|
}
|
|
11
|
-
export { html_attr_ as attr_ }
|
|
12
11
|
/**
|
|
13
12
|
* @param {string}key
|
|
14
13
|
* @param {string}val
|
|
@@ -18,4 +17,3 @@ export { html_attr_ as attr_ }
|
|
|
18
17
|
export function raw__html_attr_(key, val) {
|
|
19
18
|
return key + '="' + val + '"'
|
|
20
19
|
}
|
|
21
|
-
export { raw__html_attr_ as raw__attr_ }
|
package/all/html_attrs/index.js
CHANGED
|
@@ -5,8 +5,6 @@ import { html_attr_def_T } from '../html_attr/index.js'
|
|
|
5
5
|
* class_({class_1: true, html_class__: false, class_3: true}) // returns 'class_1 class_3'
|
|
6
6
|
*/
|
|
7
7
|
export declare function html_class_(...class_def_a:html_attr_def_T[]):string
|
|
8
|
-
export { html_class_ as class_, html_class_ as _class, }
|
|
9
8
|
export declare function html_class__(
|
|
10
9
|
...memo_class_def_a:html_attr_def_T[]
|
|
11
10
|
):(...class_def_a:html_attr_def_T[])=>string
|
|
12
|
-
export { html_class__ as class__, html_class__ as class_2, }
|
package/all/html_class/index.js
CHANGED
|
@@ -23,7 +23,6 @@ export function html_class_(...class_def_a) {
|
|
|
23
23
|
}
|
|
24
24
|
return a.join(' ')
|
|
25
25
|
}
|
|
26
|
-
export { html_class_ as class_, html_class_ as _class, }
|
|
27
26
|
/**
|
|
28
27
|
* @param {attr_def_T}memo_class_def_a
|
|
29
28
|
* @returns {(...class_def_a:attr_def_T[])=>string}
|
|
@@ -31,4 +30,3 @@ export { html_class_ as class_, html_class_ as _class, }
|
|
|
31
30
|
export function html_class__(...memo_class_def_a) {
|
|
32
31
|
return (...class_def_a)=>html_class_(...memo_class_def_a, ...class_def_a)
|
|
33
32
|
}
|
|
34
|
-
export { html_class__ as class__, html_class__ as class_2, }
|
|
@@ -5,8 +5,6 @@ import type { html_attr_def_T } from '../html_attr/index.js'
|
|
|
5
5
|
* style_({position: 'absolute, left: '5px'}) // returns 'position: absolute; left: 5px;'
|
|
6
6
|
*/
|
|
7
7
|
export declare function html_style_(...style_def_a:html_attr_def_T[]):string
|
|
8
|
-
export { html_style_ as style_, html_style_ as _style, }
|
|
9
8
|
export declare function html_style__(
|
|
10
9
|
...memo_style_def_a:html_attr_def_T[]
|
|
11
10
|
):(...style_def_a:html_attr_def_T[])=>string
|
|
12
|
-
export { html_style__ as style__, html_style__ as style_2, }
|
package/all/html_style/index.js
CHANGED
|
@@ -25,7 +25,6 @@ export function html_style_(...style_def_a) {
|
|
|
25
25
|
}
|
|
26
26
|
return a.join(' ')
|
|
27
27
|
}
|
|
28
|
-
export { html_style_ as style_, html_style_ as _style, }
|
|
29
28
|
/**
|
|
30
29
|
* @param {string}style
|
|
31
30
|
* @returns {string}
|
|
@@ -46,4 +45,3 @@ function semicolon__style_(style) {
|
|
|
46
45
|
export function html_style__(memo_style_def_a) {
|
|
47
46
|
return (...style_a)=>html_style_(memo_style_def_a, ...style_a)
|
|
48
47
|
}
|
|
49
|
-
export { html_style__ as style__, html_style__ as style_2, }
|
|
@@ -3,10 +3,6 @@ import type { html_attr_def_T } from '../html_attr/index.js'
|
|
|
3
3
|
* Assigns additional styles to the style attribute on the HTMLElement el.
|
|
4
4
|
*/
|
|
5
5
|
export declare function html_style__assign(
|
|
6
|
-
el:HTMLElement,
|
|
6
|
+
el:HTMLElement,
|
|
7
|
+
...style_def_a:html_attr_def_T[]
|
|
7
8
|
):HTMLElement
|
|
8
|
-
export {
|
|
9
|
-
html_style__assign as assign_style,
|
|
10
|
-
html_style__assign as assign__style,
|
|
11
|
-
html_style__assign as style__assign,
|
|
12
|
-
}
|
|
@@ -13,8 +13,3 @@ export function html_style__assign(el, ...style_def_a) {
|
|
|
13
13
|
el.setAttribute('style', html_style_(styles_o, ...style_def_a))
|
|
14
14
|
return el
|
|
15
15
|
}
|
|
16
|
-
export {
|
|
17
|
-
html_style__assign as assign_style,
|
|
18
|
-
html_style__assign as assign__style,
|
|
19
|
-
html_style__assign as style__assign,
|
|
20
|
-
}
|
|
@@ -4,8 +4,3 @@
|
|
|
4
4
|
* html_styles_o_('position: absolute; left: 5px;') // returns {position: 'absolute, left: '5px'}
|
|
5
5
|
*/
|
|
6
6
|
export declare function html_styles_o_(style_str:string):Record<string, string>
|
|
7
|
-
export {
|
|
8
|
-
html_styles_o_ as _styles_o,
|
|
9
|
-
html_styles_o_ as _OBJ__styles,
|
|
10
|
-
html_styles_o_ as styles_o_,
|
|
11
|
-
}
|
package/all/http_error/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/// <reference types="../error_o/index.d.ts" />
|
|
2
|
+
/// <reference types="../http_error/index.d.ts" />
|
|
1
3
|
import { assign } from '../assign/index.js'
|
|
2
|
-
/** @typedef {
|
|
3
|
-
/** @typedef {
|
|
4
|
+
/** @typedef {argument__error_o_T} */
|
|
5
|
+
/** @typedef {HttpError} */
|
|
4
6
|
/**
|
|
5
7
|
* @param {string}[message]
|
|
6
8
|
* @param {argument__error_o_T}[error_o]
|
package/all/idx/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="../array_types/index.d.ts" />
|
|
1
2
|
/**
|
|
2
3
|
* Returns idx of first match in `a` with `compare`.
|
|
3
4
|
* @param {unknown[]|undefined}in_a
|
|
4
|
-
* @param {
|
|
5
|
+
* @param {is_match__T}compare
|
|
5
6
|
* @returns {number}
|
|
6
7
|
*/
|
|
7
8
|
export function idx_(in_a, compare) {
|
package/all/idx_filter/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/// <reference types="../a_item/index.d.ts" />
|
|
2
|
+
/// <reference types="../array_types/index.d.ts" />
|
|
1
3
|
import { I__ } from '../combinators/index.js'
|
|
2
|
-
/** @typedef {import('../a_item/index.d.ts').a_item_T} */
|
|
3
|
-
/** @typedef {import('../array_types/index.d.ts').is_match__T} */
|
|
4
4
|
/**
|
|
5
5
|
* Returns Array of `idx` indices filtered by `fn`.
|
|
6
6
|
* @param {unknown[]}in_a
|
package/all/idx_key_r/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="../array_types/index.d.ts" />
|
|
2
|
+
/// <reference types="../idx_key_r/index.d.ts" />
|
|
3
|
+
/// <reference types="./index.d.ts" />
|
|
1
4
|
import { I__ } from '../combinators/index.js'
|
|
2
|
-
/** @typedef {import('../array_types/index.d.ts').item_key_idx_val_fn_T} */
|
|
3
|
-
/** @typedef {import('../idx_key_r/index.d.ts').idx_key_r_T} */
|
|
4
5
|
/**
|
|
5
6
|
* Returns a Hash where each key is `a[idx][key]` & value is `idx`.
|
|
6
7
|
* @param {unknown[]}a
|
|
@@ -45,8 +46,8 @@ export {
|
|
|
45
46
|
maybe_idx_key_r_ as maybe_idx_key_h_,
|
|
46
47
|
maybe_idx_key_r_ as _maybe_idx_key_hash,
|
|
47
48
|
}
|
|
48
|
-
/** @typedef {
|
|
49
|
-
/** @typedef {
|
|
49
|
+
/** @typedef {idx_key_r_T} */
|
|
50
|
+
/** @typedef {item_key_idx_val_fn_T} */
|
|
50
51
|
/**
|
|
51
52
|
* Returns function that returns from [_idx_key_hash](#_idx_key_hash) with `item_key_idx_val_` function argument.
|
|
52
53
|
* @param {item_key_idx_val_fn_T<string, Record<string, string>>}item_key_idx_val_
|
package/all/idx_reject/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="../array_types/index.d.ts" />
|
|
1
2
|
import { idx_sort_a_ } from '../idx_sort_a/index.js'
|
|
2
3
|
/**
|
|
3
4
|
* Returns [sort_idx_o_T](#sort_idx_o_T) derived from `val_a` sorted by `sort_idx_a`.
|
|
4
5
|
* @param {unknown[]}val_a
|
|
5
6
|
* @param {number[]}sort_idx_a
|
|
6
|
-
* @returns {
|
|
7
|
+
* @returns {sort_idx_o_T<unknown>}
|
|
7
8
|
*/
|
|
8
9
|
export function idx_sort_a__sort_idx_o_(val_a, sort_idx_a) {
|
|
9
10
|
const sort_val_a = idx_sort_a_(val_a, sort_idx_a)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function import_meta_env_<R extends ImportMetaEnv>():R
|
|
2
|
+
export function import_meta_env__ensure<R extends ImportMetaEnv>():R
|
|
3
|
+
declare global {
|
|
4
|
+
interface ImportMeta {
|
|
5
|
+
readonly env:ImportMetaEnv
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
interface ImportMetaEnv {
|
|
9
|
+
[key:string]:string
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function import_meta_env_() {
|
|
2
|
+
return import_meta_env__ensure()
|
|
3
|
+
}
|
|
4
|
+
export function import_meta_env__ensure() {
|
|
5
|
+
if (!import.meta.env) {
|
|
6
|
+
Object.assign(import.meta, {
|
|
7
|
+
env: new Proxy(process.env, {
|
|
8
|
+
get(target, prop, receiver) {
|
|
9
|
+
return Reflect.get(target, prop, receiver)
|
|
10
|
+
},
|
|
11
|
+
set(target, prop, value) {
|
|
12
|
+
return Reflect.get(target, prop, value)
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
return import.meta.env
|
|
18
|
+
}
|
package/all/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './CACHE_VERSION/index.js'
|
|
1
2
|
export * from './CacheControl_1hour_headers_/index.js'
|
|
2
3
|
export * from './CacheControl_5min_headers_/index.js'
|
|
3
4
|
export * from './ContentType__is_binary_/index.js'
|
|
@@ -7,12 +8,14 @@ export * from './LessThan/index.js'
|
|
|
7
8
|
export * from './MAX_INT/index.js'
|
|
8
9
|
export * from './MIN_INT/index.js'
|
|
9
10
|
export * from './Map__object/index.js'
|
|
11
|
+
export * from './NODE_ENV/index.js'
|
|
10
12
|
export * from './NumericRange/index.js'
|
|
11
13
|
export * from './NumericUnit/index.js'
|
|
12
14
|
export * from './PHI/index.js'
|
|
13
15
|
export * from './Request/index.js'
|
|
14
16
|
export * from './Response/index.js'
|
|
15
17
|
export * from './Timeout/index.js'
|
|
18
|
+
export * from './VERSION/index.js'
|
|
16
19
|
export * from './a/index.js'
|
|
17
20
|
export * from './a_assign/index.js'
|
|
18
21
|
export * from './a_in_idx_a_map/index.js'
|
|
@@ -31,6 +34,7 @@ export * from './andand/index.js'
|
|
|
31
34
|
export * from './andand_or/index.js'
|
|
32
35
|
export * from './andandfn/index.js'
|
|
33
36
|
export * from './apply/index.js'
|
|
37
|
+
export * from './arg_a__pick/index.js'
|
|
34
38
|
export * from './arg_i0_a/index.js'
|
|
35
39
|
export * from './arg_memo/index.js'
|
|
36
40
|
export * from './array_types/index.js'
|
|
@@ -102,8 +106,10 @@ export * from './debounce/index.js'
|
|
|
102
106
|
export * from './debounce_mapreduce/index.js'
|
|
103
107
|
export * from './deep_clone/index.js'
|
|
104
108
|
export * from './deep_equal/index.js'
|
|
109
|
+
export * from './default_arg_a/index.js'
|
|
105
110
|
export * from './defaults/index.js'
|
|
106
111
|
export * from './deg_rad/index.js'
|
|
112
|
+
export * from './dfn_flag_r/index.js'
|
|
107
113
|
export * from './diff_date/index.js'
|
|
108
114
|
export * from './difference_a/index.js'
|
|
109
115
|
export * from './difference_by/index.js'
|
|
@@ -141,6 +147,12 @@ export * from './filter_o/index.js'
|
|
|
141
147
|
export * from './filter_o/index.js'
|
|
142
148
|
export * from './find/index.js'
|
|
143
149
|
export * from './first/index.js'
|
|
150
|
+
export * from './flag_a/index.js'
|
|
151
|
+
export * from './flag_r/index.js'
|
|
152
|
+
export * from './flag_r__pick/index.js'
|
|
153
|
+
export * from './flag_r_arg_a/index.js'
|
|
154
|
+
export * from './flag_r_param_name/index.js'
|
|
155
|
+
export * from './flag_regex/index.js'
|
|
144
156
|
export * from './flatten/index.js'
|
|
145
157
|
export * from './flip/index.js'
|
|
146
158
|
export * from './float_isNaN/index.js'
|
|
@@ -188,6 +200,7 @@ export * from './idx_sort_r_a/index.js'
|
|
|
188
200
|
export * from './if_null_set_false/index.js'
|
|
189
201
|
export * from './ifelse/index.js'
|
|
190
202
|
export * from './iife/index.js'
|
|
203
|
+
export * from './import_meta_env/index.js'
|
|
191
204
|
export * from './indexOf/index.js'
|
|
192
205
|
export * from './insert/index.js'
|
|
193
206
|
export * from './int_hex/index.js'
|
|
@@ -209,6 +222,9 @@ export * from './isNumber_or/index.js'
|
|
|
209
222
|
export * from './isObject/index.js'
|
|
210
223
|
export * from './isPrimitive/index.js'
|
|
211
224
|
export * from './isPromiseLike/index.js'
|
|
225
|
+
export * from './is_development/index.js'
|
|
226
|
+
export * from './is_production/index.js'
|
|
227
|
+
export * from './is_staging/index.js'
|
|
212
228
|
export * from './item_r_idx/index.js'
|
|
213
229
|
export * from './js_html/index.js'
|
|
214
230
|
export * from './key_compare/index.js'
|
|
@@ -250,6 +266,7 @@ export * from './minute/index.js'
|
|
|
250
266
|
export * from './minute_seconds/index.js'
|
|
251
267
|
export * from './minute_seconds/index.js'
|
|
252
268
|
export * from './missing_argument/index.js'
|
|
269
|
+
export * from './missing_env__throw/index.js'
|
|
253
270
|
export * from './mixin/index.js'
|
|
254
271
|
export * from './month_a/index.js'
|
|
255
272
|
export * from './month_ms/index.js'
|
|
@@ -298,6 +315,11 @@ export * from './or_in/index.js'
|
|
|
298
315
|
export * from './or_null/index.js'
|
|
299
316
|
export * from './or_property/index.js'
|
|
300
317
|
export * from './pad2/index.js'
|
|
318
|
+
export * from './param_dfn/index.js'
|
|
319
|
+
export * from './param_dfn_a_reducer/index.js'
|
|
320
|
+
export * from './param_dfn_split_regex/index.js'
|
|
321
|
+
export * from './param_name_r_param_val_a/index.js'
|
|
322
|
+
export * from './param_r/index.js'
|
|
301
323
|
export * from './parseFloat_andor/index.js'
|
|
302
324
|
export * from './parseFloat_or/index.js'
|
|
303
325
|
export * from './parseInt_andor/index.js'
|
package/all/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './CACHE_VERSION/index.js'
|
|
1
2
|
export * from './CacheControl_1hour_headers_/index.js'
|
|
2
3
|
export * from './CacheControl_5min_headers_/index.js'
|
|
3
4
|
export * from './ContentType__is_binary_/index.js'
|
|
@@ -7,12 +8,14 @@ export * from './LessThan/index.js'
|
|
|
7
8
|
export * from './MAX_INT/index.js'
|
|
8
9
|
export * from './MIN_INT/index.js'
|
|
9
10
|
export * from './Map__object/index.js'
|
|
11
|
+
export * from './NODE_ENV/index.js'
|
|
10
12
|
export * from './NumericRange/index.js'
|
|
11
13
|
export * from './NumericUnit/index.js'
|
|
12
14
|
export * from './PHI/index.js'
|
|
13
15
|
export * from './Request/index.js'
|
|
14
16
|
export * from './Response/index.js'
|
|
15
17
|
export * from './Timeout/index.js'
|
|
18
|
+
export * from './VERSION/index.js'
|
|
16
19
|
export * from './a/index.js'
|
|
17
20
|
export * from './a_assign/index.js'
|
|
18
21
|
export * from './a_in_idx_a_map/index.js'
|
|
@@ -31,6 +34,7 @@ export * from './andand/index.js'
|
|
|
31
34
|
export * from './andand_or/index.js'
|
|
32
35
|
export * from './andandfn/index.js'
|
|
33
36
|
export * from './apply/index.js'
|
|
37
|
+
export * from './arg_a__pick/index.js'
|
|
34
38
|
export * from './arg_i0_a/index.js'
|
|
35
39
|
export * from './arg_memo/index.js'
|
|
36
40
|
export * from './array_types/index.js'
|
|
@@ -102,8 +106,10 @@ export * from './debounce/index.js'
|
|
|
102
106
|
export * from './debounce_mapreduce/index.js'
|
|
103
107
|
export * from './deep_clone/index.js'
|
|
104
108
|
export * from './deep_equal/index.js'
|
|
109
|
+
export * from './default_arg_a/index.js'
|
|
105
110
|
export * from './defaults/index.js'
|
|
106
111
|
export * from './deg_rad/index.js'
|
|
112
|
+
export * from './dfn_flag_r/index.js'
|
|
107
113
|
export * from './diff_date/index.js'
|
|
108
114
|
export * from './difference_a/index.js'
|
|
109
115
|
export * from './difference_by/index.js'
|
|
@@ -141,6 +147,12 @@ export * from './filter_o/index.js'
|
|
|
141
147
|
export * from './filter_o/index.js'
|
|
142
148
|
export * from './find/index.js'
|
|
143
149
|
export * from './first/index.js'
|
|
150
|
+
export * from './flag_a/index.js'
|
|
151
|
+
export * from './flag_r/index.js'
|
|
152
|
+
export * from './flag_r__pick/index.js'
|
|
153
|
+
export * from './flag_r_arg_a/index.js'
|
|
154
|
+
export * from './flag_r_param_name/index.js'
|
|
155
|
+
export * from './flag_regex/index.js'
|
|
144
156
|
export * from './flatten/index.js'
|
|
145
157
|
export * from './flip/index.js'
|
|
146
158
|
export * from './float_isNaN/index.js'
|
|
@@ -188,6 +200,7 @@ export * from './idx_sort_r_a/index.js'
|
|
|
188
200
|
export * from './if_null_set_false/index.js'
|
|
189
201
|
export * from './ifelse/index.js'
|
|
190
202
|
export * from './iife/index.js'
|
|
203
|
+
export * from './import_meta_env/index.js'
|
|
191
204
|
export * from './indexOf/index.js'
|
|
192
205
|
export * from './insert/index.js'
|
|
193
206
|
export * from './int_hex/index.js'
|
|
@@ -209,6 +222,9 @@ export * from './isNumber_or/index.js'
|
|
|
209
222
|
export * from './isObject/index.js'
|
|
210
223
|
export * from './isPrimitive/index.js'
|
|
211
224
|
export * from './isPromiseLike/index.js'
|
|
225
|
+
export * from './is_development/index.js'
|
|
226
|
+
export * from './is_production/index.js'
|
|
227
|
+
export * from './is_staging/index.js'
|
|
212
228
|
export * from './item_r_idx/index.js'
|
|
213
229
|
export * from './js_html/index.js'
|
|
214
230
|
export * from './key_compare/index.js'
|
|
@@ -250,6 +266,7 @@ export * from './minute/index.js'
|
|
|
250
266
|
export * from './minute_seconds/index.js'
|
|
251
267
|
export * from './minute_seconds/index.js'
|
|
252
268
|
export * from './missing_argument/index.js'
|
|
269
|
+
export * from './missing_env__throw/index.js'
|
|
253
270
|
export * from './mixin/index.js'
|
|
254
271
|
export * from './month_a/index.js'
|
|
255
272
|
export * from './month_ms/index.js'
|
|
@@ -298,6 +315,11 @@ export * from './or_in/index.js'
|
|
|
298
315
|
export * from './or_null/index.js'
|
|
299
316
|
export * from './or_property/index.js'
|
|
300
317
|
export * from './pad2/index.js'
|
|
318
|
+
export * from './param_dfn/index.js'
|
|
319
|
+
export * from './param_dfn_a_reducer/index.js'
|
|
320
|
+
export * from './param_dfn_split_regex/index.js'
|
|
321
|
+
export * from './param_name_r_param_val_a/index.js'
|
|
322
|
+
export * from './param_r/index.js'
|
|
301
323
|
export * from './parseFloat_andor/index.js'
|
|
302
324
|
export * from './parseFloat_or/index.js'
|
|
303
325
|
export * from './parseInt_andor/index.js'
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/// <reference types="../a_nowrap/index.d.ts" />
|
|
2
|
+
/// <reference types="./index.d.ts" />
|
|
1
3
|
import { intersection_set_ } from '../intersection_set/index.js'
|
|
2
4
|
import { wrap_aa_ } from '../wrap_aa/index.js'
|
|
3
5
|
/**
|
|
4
6
|
* Returns the intersection of n arrays
|
|
5
|
-
* @param {
|
|
6
|
-
* @returns {
|
|
7
|
+
* @param {a_nowrap_T<unknown>}aa_nowrap
|
|
8
|
+
* @returns {intersection_a_T<unknown>}
|
|
7
9
|
* @see {@link http://www.2ality.com/2015/01/es6-set-operations.html}
|
|
8
10
|
*/
|
|
9
11
|
export function intersection_a_(aa_nowrap) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="../wrap_aa_item/index.d.ts" />
|
|
1
2
|
import { wrap_aa_ } from '../wrap_aa/index.js'
|
|
2
3
|
/**
|
|
3
4
|
* @param {unknown}aa_nowrap
|
|
4
|
-
* @param {(v:
|
|
5
|
+
* @param {(v:wrap_aa_item_T<unknown>)=>unknown}by_
|
|
5
6
|
* @returns {unknown[]}
|
|
6
7
|
*/
|
|
7
8
|
export function intersection_by_(aa_nowrap, by_ = (v)=>v) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
/// <reference types="../invalid_state/index.d.ts" />
|
|
2
|
+
/// <reference types="./index.d.ts" />
|
|
1
3
|
import { assign } from '../assign/index.js'
|
|
2
4
|
import { HttpError } from '../http_error/index.js'
|
|
3
|
-
/** @typedef {import('../invalid_state/index.d.ts').argument__invalid_state_error_o_T} */
|
|
4
|
-
/** @typedef {import('./index.d.ts').InvalidStateError} */
|
|
5
5
|
export const invalid_state__default__message = 'Error'
|
|
6
6
|
/**
|
|
7
7
|
* @param {string}[message]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { be_memo_pair_ } from '../be_memo_pair/index.js'
|
|
2
|
+
import { NODE_ENV_ } from '../NODE_ENV/index.js'
|
|
3
|
+
export const [
|
|
4
|
+
is_development$_,
|
|
5
|
+
is_development_,
|
|
6
|
+
] = be_memo_pair_(ctx=>
|
|
7
|
+
NODE_ENV_(ctx) === 'dev' || NODE_ENV_(ctx) === 'development',
|
|
8
|
+
{ id: 'is_development' })
|
|
9
|
+
export { is_development$_ as is_development__ }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { be_memo_pair_ } from '../be_memo_pair/index.js'
|
|
2
|
+
import { NODE_ENV_ } from '../NODE_ENV/index.js'
|
|
3
|
+
export const [
|
|
4
|
+
is_production$_,
|
|
5
|
+
is_production_,
|
|
6
|
+
] = be_memo_pair_(ctx=>
|
|
7
|
+
NODE_ENV_(ctx) === 'prod' || NODE_ENV_(ctx) === 'production',
|
|
8
|
+
{ id: 'is_production' })
|
|
9
|
+
export {
|
|
10
|
+
is_production$_ as is_production__,
|
|
11
|
+
is_production$_ as b__is__production,
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { be_memo_pair_ } from '../be_memo_pair/index.js'
|
|
2
|
+
import { NODE_ENV_ } from '../NODE_ENV/index.js'
|
|
3
|
+
export const [
|
|
4
|
+
is_staging$_,
|
|
5
|
+
is_staging_,
|
|
6
|
+
] = be_memo_pair_(ctx=>
|
|
7
|
+
NODE_ENV_(ctx) === 'staging',
|
|
8
|
+
{ id: 'is_staging' })
|
|
9
|
+
export {
|
|
10
|
+
is_staging$_ as is_staging__,
|
|
11
|
+
is_staging$_ as b__is__staging,
|
|
12
|
+
}
|