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.
Files changed (208) hide show
  1. package/all/CACHE_VERSION/index.d.ts +10 -0
  2. package/all/CACHE_VERSION/index.js +14 -0
  3. package/all/NODE_ENV/index.d.ts +10 -0
  4. package/all/NODE_ENV/index.js +14 -0
  5. package/all/Request/index.js +2 -1
  6. package/all/Response/index.js +1 -1
  7. package/all/VERSION/index.d.ts +7 -0
  8. package/all/VERSION/index.js +12 -0
  9. package/all/add/index.js +1 -1
  10. package/all/all_union_a/index.js +1 -1
  11. package/all/and/index.js +2 -1
  12. package/all/andand_or/index.js +2 -1
  13. package/all/andandfn/index.js +4 -3
  14. package/all/apply/index.js +4 -2
  15. package/all/arg_a__pick/index.d.ts +6 -0
  16. package/all/arg_a__pick/index.js +16 -0
  17. package/all/arg_i0_a/index.js +3 -2
  18. package/all/assign_fn_key_a/index.js +1 -1
  19. package/all/bad_gateway/index.js +2 -1
  20. package/all/bad_request/index.js +1 -1
  21. package/all/be/index.js +3 -2
  22. package/all/be_/index.d.ts +38 -3
  23. package/all/be_/index.js +52 -14
  24. package/all/be_/index.test.ts +191 -90
  25. package/all/be_lock_memosig_triple/index.test.ts +6 -6
  26. package/all/be_memo_pair/index.test.ts +4 -4
  27. package/all/be_memosig_triple/index.test.ts +6 -6
  28. package/all/be_sig_triple/index.test.ts +4 -4
  29. package/all/binary_sort_rank/index.js +2 -1
  30. package/all/bind_apply/index.js +4 -4
  31. package/all/bind_call/index.js +1 -1
  32. package/all/bind_map_apply/index.js +1 -1
  33. package/all/bind_map_call/index.js +4 -5
  34. package/all/btoa/index.js +2 -1
  35. package/all/btoa_Uint32Array/index.js +2 -1
  36. package/all/call/index.js +2 -1
  37. package/all/call_assign/index.js +2 -1
  38. package/all/chain/index.js +3 -2
  39. package/all/clone_assign_fn_key_a/index.js +2 -1
  40. package/all/color_hsv_phi_rgb_a/index.js +3 -2
  41. package/all/color_invert_rgb_a/index.js +3 -2
  42. package/all/compact_a_ctx/index.js +2 -1
  43. package/all/compare/index.js +2 -1
  44. package/all/compose/index.js +5 -5
  45. package/all/concat_truthy_a/index.js +4 -2
  46. package/all/console__error/index.js +2 -1
  47. package/all/crypto__sign/index.js +2 -1
  48. package/all/currency_str/index.js +2 -1
  49. package/all/currency_symbol/index.js +2 -1
  50. package/all/curry/index.js +2 -2
  51. package/all/date/index.js +1 -1
  52. package/all/default_arg_a/index.d.ts +11 -0
  53. package/all/default_arg_a/index.js +41 -0
  54. package/all/dfn_flag_r/index.d.ts +8 -0
  55. package/all/dfn_flag_r/index.js +24 -0
  56. package/all/difference_a/index.js +4 -2
  57. package/all/each/index.js +2 -1
  58. package/all/ensure__refresh/index.js +3 -2
  59. package/all/eq/index.js +5 -3
  60. package/all/eql_fn_a/index.js +1 -1
  61. package/all/error__print/index.js +4 -2
  62. package/all/error_o/index.js +4 -2
  63. package/all/falsy__none/index.js +2 -1
  64. package/all/fetch/index.js +2 -1
  65. package/all/fetch__template_pair/index.js +2 -1
  66. package/all/fetch_method/index.js +2 -1
  67. package/all/fetch_response_pair/index.js +4 -2
  68. package/all/filter/index.js +2 -1
  69. package/all/filter_o/index.js +3 -2
  70. package/all/find/index.js +1 -1
  71. package/all/flag_a/index.d.ts +6 -0
  72. package/all/flag_a/index.js +13 -0
  73. package/all/flag_r/index.d.ts +8 -0
  74. package/all/flag_r/index.js +34 -0
  75. package/all/flag_r__pick/index.d.ts +11 -0
  76. package/all/flag_r__pick/index.js +31 -0
  77. package/all/flag_r_arg_a/index.d.ts +9 -0
  78. package/all/flag_r_arg_a/index.js +27 -0
  79. package/all/flag_r_param_name/index.d.ts +9 -0
  80. package/all/flag_r_param_name/index.js +24 -0
  81. package/all/flag_regex/index.d.ts +1 -0
  82. package/all/flag_regex/index.js +1 -0
  83. package/all/flatten/index.js +7 -7
  84. package/all/flip/index.js +3 -2
  85. package/all/head_arg_a/index.js +3 -2
  86. package/all/headers/index.js +1 -1
  87. package/all/hex__digest/index.js +2 -1
  88. package/all/hmac/index.js +2 -1
  89. package/all/hmac_key/index.js +2 -1
  90. package/all/html/index.d.ts +0 -1
  91. package/all/html/index.js +0 -4
  92. package/all/html_attr/index.d.ts +0 -2
  93. package/all/html_attr/index.js +0 -2
  94. package/all/html_attrs/index.d.ts +0 -1
  95. package/all/html_attrs/index.js +0 -1
  96. package/all/html_class/index.d.ts +0 -2
  97. package/all/html_class/index.js +0 -2
  98. package/all/html_dataset__data_attrs/index.d.ts +0 -1
  99. package/all/html_dataset__data_attrs/index.js +0 -1
  100. package/all/html_style/index.d.ts +0 -2
  101. package/all/html_style/index.js +0 -2
  102. package/all/html_style__assign/index.d.ts +2 -6
  103. package/all/html_style__assign/index.js +0 -5
  104. package/all/html_styles_o/index.d.ts +0 -5
  105. package/all/html_styles_o/index.js +0 -5
  106. package/all/http_error/index.js +4 -2
  107. package/all/idx/index.js +2 -1
  108. package/all/idx_filter/index.js +2 -2
  109. package/all/idx_key_r/index.js +5 -4
  110. package/all/idx_reject/index.js +1 -1
  111. package/all/idx_sort_a__sort_idx_o/index.js +2 -1
  112. package/all/import_meta_env/index.d.ts +10 -0
  113. package/all/import_meta_env/index.js +18 -0
  114. package/all/index.d.ts +22 -0
  115. package/all/index.js +22 -0
  116. package/all/intersection_a/index.js +4 -2
  117. package/all/intersection_by/index.js +2 -1
  118. package/all/invalid_state/index.js +2 -2
  119. package/all/is_development/index.d.ts +6 -0
  120. package/all/is_development/index.js +9 -0
  121. package/all/is_production/index.d.ts +9 -0
  122. package/all/is_production/index.js +12 -0
  123. package/all/is_staging/index.d.ts +9 -0
  124. package/all/is_staging/index.js +12 -0
  125. package/all/item_r_idx/index.js +2 -1
  126. package/all/js_html/index.d.ts +0 -4
  127. package/all/js_html/index.js +0 -4
  128. package/all/left_and/index.js +2 -1
  129. package/all/left_or/index.js +2 -1
  130. package/all/line__parse/index.js +2 -3
  131. package/all/line__transform_stream/index.js +1 -1
  132. package/all/links_html/index.d.ts +0 -5
  133. package/all/links_html/index.js +0 -4
  134. package/all/many_andand/index.js +4 -2
  135. package/all/many_andand_or/index.js +6 -3
  136. package/all/map/index.js +1 -1
  137. package/all/map_andand/index.js +1 -1
  138. package/all/map_andand_or/index.js +3 -2
  139. package/all/map_andandfn/index.js +2 -1
  140. package/all/map_apply/index.js +2 -1
  141. package/all/map_call/index.js +3 -2
  142. package/all/map_find/index.js +1 -1
  143. package/all/map_obj/index.js +3 -2
  144. package/all/map_obj_andand/index.js +1 -1
  145. package/all/missing_argument/index.js +3 -2
  146. package/all/missing_env__throw/index.d.ts +8 -0
  147. package/all/missing_env__throw/index.js +19 -0
  148. package/all/money_str/index.js +2 -2
  149. package/all/neq/index.js +2 -1
  150. package/all/not/index.js +4 -3
  151. package/all/not_found/index.js +1 -1
  152. package/all/nullish__none/index.js +1 -1
  153. package/all/nullish__not_all/index.js +1 -1
  154. package/all/number__count/index.js +2 -2
  155. package/all/o_a_present/index.js +1 -1
  156. package/all/one_andand/index.js +2 -1
  157. package/all/one_andand_or/index.js +3 -2
  158. package/all/or/index.js +2 -3
  159. package/all/or_null/index.js +2 -1
  160. package/all/param_dfn/index.d.ts +1 -0
  161. package/all/param_dfn/index.js +1 -0
  162. package/all/param_dfn_a_reducer/index.d.ts +9 -0
  163. package/all/param_dfn_a_reducer/index.js +12 -0
  164. package/all/param_dfn_split_regex/index.d.ts +1 -0
  165. package/all/param_dfn_split_regex/index.js +1 -0
  166. package/all/param_name_r_param_val_a/index.d.ts +11 -0
  167. package/all/param_name_r_param_val_a/index.js +29 -0
  168. package/all/param_r/index.d.ts +16 -0
  169. package/all/param_r/index.js +33 -0
  170. package/all/param_r/index.test.ts +28 -0
  171. package/all/parseFloat_andor/index.d.ts +3 -2
  172. package/all/parseFloat_andor/index.test.ts +1 -1
  173. package/all/promise_o/index.js +2 -1
  174. package/all/rank/index.js +2 -1
  175. package/all/reduce/index.js +1 -1
  176. package/all/reject/index.js +1 -1
  177. package/all/response_o/index.js +2 -3
  178. package/all/right_and/index.js +2 -1
  179. package/all/right_or/index.js +2 -1
  180. package/all/slice_arg_a/index.js +3 -2
  181. package/all/slice_arg_spread_a/index.js +3 -2
  182. package/all/sort/index.js +1 -1
  183. package/all/sort_a/index.js +1 -1
  184. package/all/sort_idx_a/index.js +1 -1
  185. package/all/sort_idx_o/index.js +5 -4
  186. package/all/sort_val_a/index.js +1 -1
  187. package/all/sort_val_a__transition_idx_a/index.js +1 -3
  188. package/all/spread/index.js +1 -1
  189. package/all/spread_slice/index.js +2 -1
  190. package/all/tap/index.js +1 -1
  191. package/all/tempfile_path/index.test.ts +1 -1
  192. package/all/unauthorized/index.js +1 -1
  193. package/all/unformat_currency_str/index.js +1 -2
  194. package/all/union_a/index.js +3 -2
  195. package/all/union_by/index.js +1 -1
  196. package/all/url__join/index.js +2 -1
  197. package/all/weak_r/index.js +1 -1
  198. package/all/wrap_a/index.js +8 -5
  199. package/all/wrap_aa/index.js +3 -2
  200. package/all/wrap_concat/index.js +4 -3
  201. package/all/zip_with/index.js +1 -1
  202. package/cli-args/index.d.ts +14 -0
  203. package/cli-args/index.js +14 -0
  204. package/env/index.d.ts +8 -0
  205. package/env/index.js +8 -0
  206. package/html/index.d.ts +31 -0
  207. package/html/index.js +31 -0
  208. package/package.json +13 -7
@@ -0,0 +1 @@
1
+ export declare const flag_regex:RegExp
@@ -0,0 +1 @@
1
+ export const flag_regex = /^--?(.*)/
@@ -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
- wrap_concat(
13
- previous_val,
14
- ...isArray(current_val)
15
- ? flatten(current_val)
16
- : [current_val]),
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{import('../resolver_curry').append_current_T}
4
- * @returns {import('../resolver_curry').resolver_curry_T<unknown>}
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)=>
@@ -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 {import('../slice_arg_a/index.js').slice_arg_a_fn_T}fn
5
+ * @param {slice_arg_a_fn_T}fn
5
6
  * @param {number}[count]
6
- * @returns {import('../slice_arg_a_/index.js').slice_arg_a_T}
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)
@@ -1,4 +1,4 @@
1
- /** @typedef {import('../headers/index.d.ts').Headers} */
1
+ /// <reference types="../headers/index.d.ts" />
2
2
  export const { Headers } = globalThis
3
3
  /**
4
4
  * @param {HeadersInit}[init]
@@ -1,6 +1,7 @@
1
+ /// <reference types="../hex__digest/index.d.ts" />
1
2
  import { crypto_ } from '../crypto/index.js'
2
3
  /**
3
- * @param {import('../hex__digest/index.js').digest__algorithm_T}algorithm
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 {import('../hmac/index.js').digest__algorithm_T}algorithm
6
+ * @param {digest__algorithm_T}algorithm
6
7
  * @param {string|BufferSource|CryptoKey}key
7
8
  * @param {string|BufferSource}data
8
9
  * @returns {Promise<string>}
@@ -1,6 +1,7 @@
1
+ /// <reference types="../hmac_key/index.d.ts" />
1
2
  import { crypto_ } from '../crypto/index.js'
2
3
  /**
3
- * @param {import('../hmac_key/index.js').digest__algorithm_T}algorithm
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/
@@ -2,4 +2,3 @@
2
2
  * Returns a string of escaped html
3
3
  */
4
4
  export declare function html_(unsafe:string):string
5
- export { html_ as _html, }
package/all/html/index.js CHANGED
@@ -13,7 +13,3 @@ export function html_(unsafe) {
13
13
  .replace(/'/g, '&#039;')
14
14
  )
15
15
  }
16
- export {
17
- html_ as html__escape,
18
- html_ as _html,
19
- }
@@ -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
 
@@ -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_ }
@@ -3,4 +3,3 @@ import type { html_attr_def_T } from '../html_attr/index.js'
3
3
  * Returns a string of attrs for an html element
4
4
  */
5
5
  export declare function html_attrs_(...attr_def_a:html_attr_def_T[]):string
6
- export { html_attrs_ as attrs_, html_attrs_ as _attrs, }
@@ -26,4 +26,3 @@ export function html_attrs_(...attr_def_a) {
26
26
  }
27
27
  return a.join(' ')
28
28
  }
29
- export { html_attrs_ as attrs_, html_attrs_ as _attrs, }
@@ -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, }
@@ -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, }
@@ -1,2 +1 @@
1
1
  export declare function html_dataset__data_attrs_<R extends Record<string, unknown>>(dataset:R):R
2
- export { html_dataset__data_attrs_ as dataset__data_attrs_ }
@@ -9,4 +9,3 @@ export function html_dataset__data_attrs_(dataset) {
9
9
  return o
10
10
  }, {})
11
11
  }
12
- export { html_dataset__data_attrs_ as dataset__data_attrs_ }
@@ -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, }
@@ -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, ...style_def_a:html_attr_def_T[]
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
- }
@@ -16,8 +16,3 @@ export function html_styles_o_(style_str) {
16
16
  }
17
17
  return styles_o
18
18
  }
19
- export {
20
- html_styles_o_ as _styles_o,
21
- html_styles_o_ as _OBJ__styles,
22
- html_styles_o_ as styles_o_,
23
- }
@@ -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 {import('../error_o/index.d.ts').argument__error_o_T} */
3
- /** @typedef {import('../http_error/index.d.ts').HttpError} */
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 {import('../array_types/index.js').is_match__T}compare
5
+ * @param {is_match__T}compare
5
6
  * @returns {number}
6
7
  */
7
8
  export function idx_(in_a, compare) {
@@ -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
@@ -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 {import('./index.d.ts').idx_key_r_T} */
49
- /** @typedef {import('../array_types/index.d.ts').item_key_idx_val_fn_T} */
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_
@@ -1,4 +1,4 @@
1
- /** @typedef {import('../array_types/index.d.ts').is_match__T} */
1
+ /// <reference types="../array_types/index.d.ts" />
2
2
  /**
3
3
  * Returns Array of indices `idx` not rejected by `is_match_`.
4
4
  * @param {unknown[]}a
@@ -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 {import('../array_types/index.js').sort_idx_o_T<unknown>}
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 {import('../a_nowrap/index.js').a_nowrap_T<unknown>}aa_nowrap
6
- * @returns {import('./index.d.ts').intersection_a_T<unknown>}
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:import('../wrap_aa_item').wrap_aa_item_T<unknown>)=>unknown}by_
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,6 @@
1
+ import type { be_memo_pair_T } from 'rmemo'
2
+ export declare const [
3
+ is_development$_,
4
+ is_development_,
5
+ ]:be_memo_pair_T<boolean>
6
+ export { is_development$_ as is_development__ }
@@ -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,9 @@
1
+ import type { be_memo_pair_T } from 'rmemo'
2
+ export declare const [
3
+ is_production$_,
4
+ is_production_,
5
+ ]:be_memo_pair_T<boolean>
6
+ export {
7
+ is_production$_ as is_production__,
8
+ is_production$_ as b__is__production,
9
+ }
@@ -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,9 @@
1
+ import type { be_memo_pair_T } from 'rmemo'
2
+ export const [
3
+ is_staging$_,
4
+ is_staging_,
5
+ ]: be_memo_pair_T<boolean>
6
+ export {
7
+ is_staging$_ as is_staging__,
8
+ is_staging$_ as b__is__staging,
9
+ }
@@ -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
+ }