inferred-types 0.46.1 → 0.47.1

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 (721) hide show
  1. package/dist/constants/Marked.d.ts +7 -0
  2. package/dist/constants/Marked.d.ts.map +1 -1
  3. package/dist/constants/Never.d.ts.map +1 -1
  4. package/dist/constants/Tailwind.d.ts +31 -0
  5. package/dist/constants/Tailwind.d.ts.map +1 -0
  6. package/dist/constants/Tailwind.js +30 -0
  7. package/dist/constants/TypeTokens.d.ts +15 -0
  8. package/dist/constants/TypeTokens.d.ts.map +1 -1
  9. package/dist/constants/TypeTokens.js +92 -0
  10. package/dist/constants/Wide.d.ts +2 -1
  11. package/dist/constants/Wide.d.ts.map +1 -1
  12. package/dist/constants/Wide.js +0 -1
  13. package/dist/constants/createConstant.d.ts.map +1 -1
  14. package/dist/constants/index.d.ts +1 -0
  15. package/dist/constants/index.d.ts.map +1 -1
  16. package/dist/constants/index.js +1 -0
  17. package/dist/constants/tsconfig.tsbuildinfo +1 -1
  18. package/dist/inferred-types/index.cjs +1827 -1076
  19. package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
  20. package/dist/runtime/api/defineApi.d.ts +1 -36
  21. package/dist/runtime/api/defineApi.d.ts.map +1 -1
  22. package/dist/runtime/api/defineApi.js +90 -73
  23. package/dist/runtime/api/handleDoneFn.d.ts.map +1 -1
  24. package/dist/runtime/api/index.d.ts +1 -1
  25. package/dist/runtime/boolean-logic/ifArray.d.ts.map +1 -1
  26. package/dist/runtime/boolean-logic/ifArrayPartial.d.ts +1 -1
  27. package/dist/runtime/boolean-logic/ifArrayPartial.d.ts.map +1 -1
  28. package/dist/runtime/boolean-logic/ifBoolean.d.ts.map +1 -1
  29. package/dist/runtime/boolean-logic/ifChar.d.ts.map +1 -1
  30. package/dist/runtime/boolean-logic/ifFalse.d.ts.map +1 -1
  31. package/dist/runtime/boolean-logic/ifHasKey.d.ts.map +1 -1
  32. package/dist/runtime/boolean-logic/ifLength.d.ts.map +1 -1
  33. package/dist/runtime/boolean-logic/ifNotNull.d.ts.map +1 -1
  34. package/dist/runtime/boolean-logic/ifNull.d.ts.map +1 -1
  35. package/dist/runtime/boolean-logic/ifNumber.d.ts.map +1 -1
  36. package/dist/runtime/boolean-logic/ifScalar.d.ts.map +1 -1
  37. package/dist/runtime/boolean-logic/ifString.d.ts.map +1 -1
  38. package/dist/runtime/boolean-logic/ifTrue.d.ts.map +1 -1
  39. package/dist/runtime/boolean-logic/ifUndefined.d.ts.map +1 -1
  40. package/dist/runtime/boolean-logic/ifUndefined.js +1 -1
  41. package/dist/runtime/combinators/and.d.ts.map +1 -1
  42. package/dist/runtime/combinators/or.d.ts.map +1 -1
  43. package/dist/runtime/dictionary/entries.js +1 -1
  44. package/dist/runtime/dictionary/get.d.ts.map +1 -1
  45. package/dist/runtime/dictionary/keysOf.d.ts.map +1 -1
  46. package/dist/runtime/dictionary/omit.d.ts.map +1 -1
  47. package/dist/runtime/dictionary/retain.d.ts +4 -9
  48. package/dist/runtime/dictionary/retain.d.ts.map +1 -1
  49. package/dist/runtime/dictionary/sharedKeys.d.ts +1 -1
  50. package/dist/runtime/dictionary/sharedKeys.d.ts.map +1 -1
  51. package/dist/runtime/dictionary/takeProp.d.ts.map +1 -1
  52. package/dist/runtime/dictionary/valuesOf.d.ts.map +1 -1
  53. package/dist/runtime/dictionary/withDefaults.d.ts.map +1 -1
  54. package/dist/runtime/dictionary/withKeys.d.ts +2 -2
  55. package/dist/runtime/dictionary/withKeys.d.ts.map +1 -1
  56. package/dist/runtime/dictionary/withoutKeys.d.ts +1 -13
  57. package/dist/runtime/dictionary/withoutKeys.d.ts.map +1 -1
  58. package/dist/runtime/dictionary/withoutValue.d.ts.map +1 -1
  59. package/dist/runtime/errors/KindError.d.ts.map +1 -1
  60. package/dist/runtime/errors/TypedError.d.ts.map +1 -1
  61. package/dist/runtime/errors/createErrorCondition.d.ts +5 -0
  62. package/dist/runtime/errors/createErrorCondition.d.ts.map +1 -1
  63. package/dist/runtime/errors/createErrorCondition.js +5 -0
  64. package/dist/runtime/errors/kindedError.d.ts.map +1 -1
  65. package/dist/runtime/functions/fnMeta.d.ts.map +1 -1
  66. package/dist/runtime/index.d.ts +2 -0
  67. package/dist/runtime/index.d.ts.map +1 -1
  68. package/dist/runtime/index.js +2 -0
  69. package/dist/runtime/initializers/addFnToProps.d.ts +2 -2
  70. package/dist/runtime/initializers/addFnToProps.d.ts.map +1 -1
  71. package/dist/runtime/initializers/addPropsToFn.d.ts +2 -2
  72. package/dist/runtime/initializers/addPropsToFn.d.ts.map +1 -1
  73. package/dist/runtime/initializers/createFnWithProps.d.ts.map +1 -1
  74. package/dist/runtime/initializers/defineObj.d.ts +2 -2
  75. package/dist/runtime/initializers/defineObj.d.ts.map +1 -1
  76. package/dist/runtime/initializers/defineTuple.d.ts.map +1 -1
  77. package/dist/runtime/lists/asArray.d.ts.map +1 -1
  78. package/dist/runtime/lists/createComparison.d.ts +2 -3
  79. package/dist/runtime/lists/createComparison.d.ts.map +1 -1
  80. package/dist/runtime/lists/createComparison.js +1 -1
  81. package/dist/runtime/lists/createConverter.d.ts +1 -1
  82. package/dist/runtime/lists/createConverter.d.ts.map +1 -1
  83. package/dist/runtime/lists/filter.d.ts +1 -1
  84. package/dist/runtime/lists/filter.js +4 -4
  85. package/dist/runtime/lists/find.d.ts +1 -1
  86. package/dist/runtime/lists/find.d.ts.map +1 -1
  87. package/dist/runtime/lists/index.d.ts +0 -1
  88. package/dist/runtime/lists/index.d.ts.map +1 -1
  89. package/dist/runtime/lists/index.js +0 -1
  90. package/dist/runtime/lists/indexOf.d.ts.map +1 -1
  91. package/dist/runtime/lists/indexOf.js +8 -5
  92. package/dist/runtime/lists/intersection.d.ts.map +1 -1
  93. package/dist/runtime/lists/join.d.ts +1 -1
  94. package/dist/runtime/lists/join.d.ts.map +1 -1
  95. package/dist/runtime/lists/join.js +6 -2
  96. package/dist/runtime/lists/last.d.ts +2 -2
  97. package/dist/runtime/lists/last.d.ts.map +1 -1
  98. package/dist/runtime/lists/logicalReturns.d.ts.map +1 -1
  99. package/dist/runtime/lists/reverse.d.ts.map +1 -1
  100. package/dist/runtime/lists/shift.d.ts +17 -5
  101. package/dist/runtime/lists/shift.d.ts.map +1 -1
  102. package/dist/runtime/lists/shift.js +33 -5
  103. package/dist/runtime/lists/slice.d.ts +2 -2
  104. package/dist/runtime/lists/slice.d.ts.map +1 -1
  105. package/dist/runtime/lists/unique.d.ts +2 -2
  106. package/dist/runtime/lists/unique.d.ts.map +1 -1
  107. package/dist/runtime/literals/box.d.ts.map +1 -1
  108. package/dist/runtime/literals/ensureLeading.d.ts +2 -2
  109. package/dist/runtime/literals/ensureLeading.d.ts.map +1 -1
  110. package/dist/runtime/literals/ensureLeading.js +6 -2
  111. package/dist/runtime/literals/ensureSurround.d.ts.map +1 -1
  112. package/dist/runtime/literals/ensureSurround.js +3 -1
  113. package/dist/runtime/literals/identity.d.ts.map +1 -1
  114. package/dist/runtime/literals/index.d.ts +2 -1
  115. package/dist/runtime/literals/index.d.ts.map +1 -1
  116. package/dist/runtime/literals/index.js +2 -1
  117. package/dist/runtime/literals/narrow.d.ts.map +1 -1
  118. package/dist/runtime/literals/phone/asPhoneNumber.d.ts +2 -0
  119. package/dist/runtime/literals/phone/asPhoneNumber.d.ts.map +1 -0
  120. package/dist/runtime/literals/phone/asPhoneNumber.js +62 -0
  121. package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts +3 -0
  122. package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts.map +1 -0
  123. package/dist/runtime/literals/phone/getPhoneCountryCode.js +7 -0
  124. package/dist/runtime/literals/phone/index.d.ts +4 -0
  125. package/dist/runtime/literals/phone/index.d.ts.map +1 -0
  126. package/dist/runtime/literals/phone/index.js +3 -0
  127. package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts +3 -0
  128. package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts.map +1 -0
  129. package/dist/runtime/literals/phone/removePhoneCountryCode.js +7 -0
  130. package/dist/runtime/literals/pluralize.d.ts.map +1 -1
  131. package/dist/runtime/literals/pluralize.js +4 -1
  132. package/dist/runtime/literals/retainAfter.d.ts.map +1 -1
  133. package/dist/runtime/literals/retainChars.d.ts +1 -1
  134. package/dist/runtime/literals/retainChars.d.ts.map +1 -1
  135. package/dist/runtime/literals/retainChars.js +2 -1
  136. package/dist/runtime/literals/retainWhile.d.ts.map +1 -1
  137. package/dist/runtime/literals/split.d.ts.map +1 -1
  138. package/dist/runtime/literals/stripAfter.d.ts.map +1 -1
  139. package/dist/runtime/literals/stripBefore.d.ts.map +1 -1
  140. package/dist/runtime/literals/stripChars.d.ts +1 -1
  141. package/dist/runtime/literals/stripChars.d.ts.map +1 -1
  142. package/dist/runtime/literals/stripChars.js +2 -1
  143. package/dist/runtime/literals/stripLeading.d.ts +1 -1
  144. package/dist/runtime/literals/stripLeading.d.ts.map +1 -1
  145. package/dist/runtime/literals/stripLeading.js +8 -6
  146. package/dist/runtime/literals/stripSurround.d.ts +19 -0
  147. package/dist/runtime/literals/stripSurround.d.ts.map +1 -0
  148. package/dist/runtime/literals/stripSurround.js +30 -0
  149. package/dist/runtime/literals/stripTrailing.d.ts +2 -2
  150. package/dist/runtime/literals/stripTrailing.d.ts.map +1 -1
  151. package/dist/runtime/literals/stripTrailing.js +9 -10
  152. package/dist/runtime/literals/stripUntil.d.ts.map +1 -1
  153. package/dist/runtime/literals/takeNumericCharacters.d.ts +2 -2
  154. package/dist/runtime/literals/takeNumericCharacters.d.ts.map +1 -1
  155. package/dist/runtime/literals/toKebabCase.d.ts.map +1 -1
  156. package/dist/runtime/literals/toNumericArray.d.ts +2 -2
  157. package/dist/runtime/literals/toNumericArray.d.ts.map +1 -1
  158. package/dist/runtime/literals/toPascalCase.d.ts.map +1 -1
  159. package/dist/runtime/literals/truncate.d.ts +1 -1
  160. package/dist/runtime/literals/truncate.d.ts.map +1 -1
  161. package/dist/runtime/literals/tuple.d.ts +1 -1
  162. package/dist/runtime/literals/tuple.d.ts.map +1 -1
  163. package/dist/runtime/meta/urlMeta.d.ts.map +1 -1
  164. package/dist/runtime/meta/urlMeta.js +8 -5
  165. package/dist/runtime/meta/youtube-meta.d.ts.map +1 -1
  166. package/dist/runtime/queues/fifo.d.ts +3 -0
  167. package/dist/runtime/queues/fifo.d.ts.map +1 -0
  168. package/dist/runtime/queues/fifo.js +40 -0
  169. package/dist/runtime/queues/index.d.ts +3 -0
  170. package/dist/runtime/queues/index.d.ts.map +1 -0
  171. package/dist/runtime/queues/index.js +2 -0
  172. package/dist/runtime/queues/lifo.d.ts +3 -0
  173. package/dist/runtime/queues/lifo.d.ts.map +1 -0
  174. package/dist/runtime/queues/lifo.js +34 -0
  175. package/dist/runtime/runtime-types/asToken.d.ts +35 -0
  176. package/dist/runtime/runtime-types/asToken.d.ts.map +1 -0
  177. package/dist/runtime/runtime-types/asToken.js +115 -0
  178. package/dist/runtime/runtime-types/asType.d.ts +4 -0
  179. package/dist/runtime/runtime-types/asType.d.ts.map +1 -0
  180. package/dist/runtime/runtime-types/asType.js +6 -0
  181. package/dist/runtime/runtime-types/choices.js +8 -8
  182. package/dist/runtime/runtime-types/index.d.ts +3 -2
  183. package/dist/runtime/runtime-types/index.d.ts.map +1 -1
  184. package/dist/runtime/runtime-types/index.js +3 -2
  185. package/dist/runtime/runtime-types/ip6Prefix.d.ts +2 -2
  186. package/dist/runtime/runtime-types/ip6Prefix.d.ts.map +1 -1
  187. package/dist/runtime/runtime-types/list.d.ts.map +1 -1
  188. package/dist/runtime/runtime-types/rec.d.ts.map +1 -1
  189. package/dist/runtime/runtime-types/shape-helpers/addToken.d.ts.map +1 -1
  190. package/dist/runtime/runtime-types/shape-helpers/atomics.d.ts.map +1 -1
  191. package/dist/runtime/runtime-types/shape-helpers/functions.d.ts +7 -2
  192. package/dist/runtime/runtime-types/shape-helpers/functions.d.ts.map +1 -1
  193. package/dist/runtime/runtime-types/shape-helpers/functions.js +5 -0
  194. package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts +2 -1
  195. package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts.map +1 -1
  196. package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts +2 -1
  197. package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts.map +1 -1
  198. package/dist/runtime/runtime-types/shape-helpers/literal-containers.d.ts.map +1 -1
  199. package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts +12 -0
  200. package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts.map +1 -0
  201. package/dist/runtime/runtime-types/shape-helpers/regexToken.js +39 -0
  202. package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts +10 -0
  203. package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts.map +1 -1
  204. package/dist/runtime/runtime-types/shape-helpers/singletons.js +15 -0
  205. package/dist/runtime/runtime-types/shape-helpers/union.d.ts +5 -0
  206. package/dist/runtime/runtime-types/shape-helpers/union.d.ts.map +1 -1
  207. package/dist/runtime/runtime-types/shape-helpers/union.js +5 -0
  208. package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts +1 -1
  209. package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts.map +1 -1
  210. package/dist/runtime/runtime-types/shape.d.ts +2 -2
  211. package/dist/runtime/runtime-types/shape.d.ts.map +1 -1
  212. package/dist/runtime/runtime-types/shape.js +1 -1
  213. package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts +30 -0
  214. package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts.map +1 -0
  215. package/dist/runtime/runtime-types/tokens/createTypeToken.js +29 -0
  216. package/dist/runtime/runtime-types/tokens/index.d.ts +3 -0
  217. package/dist/runtime/runtime-types/tokens/index.d.ts.map +1 -0
  218. package/dist/runtime/runtime-types/tokens/index.js +2 -0
  219. package/dist/runtime/runtime-types/tokens/simpleToken.d.ts +51 -0
  220. package/dist/runtime/runtime-types/tokens/simpleToken.d.ts.map +1 -0
  221. package/dist/runtime/runtime-types/tokens/simpleToken.js +64 -0
  222. package/dist/runtime/sets/uniqueKeys.d.ts.map +1 -1
  223. package/dist/runtime/tsconfig.tsbuildinfo +1 -1
  224. package/dist/runtime/type-conversion/asChars.d.ts.map +1 -1
  225. package/dist/runtime/type-conversion/asRecord.d.ts +1 -1
  226. package/dist/runtime/type-conversion/asRecord.d.ts.map +1 -1
  227. package/dist/runtime/type-conversion/asString.d.ts +7 -1
  228. package/dist/runtime/type-conversion/asString.d.ts.map +1 -1
  229. package/dist/runtime/type-conversion/asString.js +11 -3
  230. package/dist/runtime/type-conversion/csv.d.ts +17 -0
  231. package/dist/runtime/type-conversion/csv.d.ts.map +1 -0
  232. package/dist/runtime/type-conversion/csv.js +31 -0
  233. package/dist/runtime/type-conversion/index.d.ts +2 -0
  234. package/dist/runtime/type-conversion/index.d.ts.map +1 -1
  235. package/dist/runtime/type-conversion/index.js +2 -0
  236. package/dist/runtime/type-conversion/ip6GroupExpansion.d.ts.map +1 -1
  237. package/dist/runtime/type-conversion/json.d.ts +18 -0
  238. package/dist/runtime/type-conversion/json.d.ts.map +1 -0
  239. package/dist/runtime/type-conversion/json.js +27 -0
  240. package/dist/runtime/type-conversion/mergeObjects.d.ts.map +1 -1
  241. package/dist/runtime/type-conversion/mergeScalars.d.ts.map +1 -1
  242. package/dist/runtime/type-conversion/optional.d.ts +20 -4
  243. package/dist/runtime/type-conversion/optional.d.ts.map +1 -1
  244. package/dist/runtime/type-conversion/optional.js +24 -6
  245. package/dist/runtime/type-conversion/union.d.ts.map +1 -1
  246. package/dist/runtime/type-guards/api-tg.d.ts.map +1 -1
  247. package/dist/runtime/type-guards/hasErrorConditions.d.ts +2 -4
  248. package/dist/runtime/type-guards/hasErrorConditions.d.ts.map +1 -1
  249. package/dist/runtime/type-guards/hasIndexOf.d.ts +2 -2
  250. package/dist/runtime/type-guards/hasIndexOf.d.ts.map +1 -1
  251. package/dist/runtime/type-guards/hasKeys.d.ts.map +1 -1
  252. package/dist/runtime/type-guards/hasWhitespace.d.ts.map +1 -1
  253. package/dist/runtime/type-guards/hasWhitespace.js +1 -1
  254. package/dist/runtime/type-guards/higher-order/endsWith.d.ts.map +1 -1
  255. package/dist/runtime/type-guards/higher-order/isEqual.d.ts.map +1 -1
  256. package/dist/runtime/type-guards/higher-order/isEqual.js +1 -1
  257. package/dist/runtime/type-guards/higher-order/isLength.d.ts.map +1 -1
  258. package/dist/runtime/type-guards/higher-order/isLength.js +1 -5
  259. package/dist/runtime/type-guards/higher-order/isSameTypeOf.d.ts.map +1 -1
  260. package/dist/runtime/type-guards/higher-order/isTuple.d.ts +1 -2
  261. package/dist/runtime/type-guards/higher-order/isTuple.d.ts.map +1 -1
  262. package/dist/runtime/type-guards/higher-order/isTuple.js +1 -2
  263. package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts +1 -1
  264. package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts.map +1 -1
  265. package/dist/runtime/type-guards/higher-order/startsWith.d.ts.map +1 -1
  266. package/dist/runtime/type-guards/higher-order/startsWith.js +1 -2
  267. package/dist/runtime/type-guards/index.d.ts +5 -0
  268. package/dist/runtime/type-guards/index.d.ts.map +1 -1
  269. package/dist/runtime/type-guards/index.js +5 -0
  270. package/dist/runtime/type-guards/isAlpha.d.ts.map +1 -1
  271. package/dist/runtime/type-guards/isBooleanLike.d.ts +9 -0
  272. package/dist/runtime/type-guards/isBooleanLike.d.ts.map +1 -0
  273. package/dist/runtime/type-guards/isBooleanLike.js +11 -0
  274. package/dist/runtime/type-guards/isCssAspectRatio.d.ts +1 -1
  275. package/dist/runtime/type-guards/isCssAspectRatio.d.ts.map +1 -1
  276. package/dist/runtime/type-guards/isDoneFn.d.ts.map +1 -1
  277. package/dist/runtime/type-guards/isEmail.d.ts +2 -1
  278. package/dist/runtime/type-guards/isEmail.d.ts.map +1 -1
  279. package/dist/runtime/type-guards/isEmail.js +10 -4
  280. package/dist/runtime/type-guards/isFalsy.d.ts.map +1 -1
  281. package/dist/runtime/type-guards/isHexadecimal.d.ts.map +1 -1
  282. package/dist/runtime/type-guards/isInlineSvg.d.ts +2 -1
  283. package/dist/runtime/type-guards/isInlineSvg.d.ts.map +1 -1
  284. package/dist/runtime/type-guards/isLeftRight.d.ts +2 -2
  285. package/dist/runtime/type-guards/isLeftRight.d.ts.map +1 -1
  286. package/dist/runtime/type-guards/isNever.d.ts.map +1 -1
  287. package/dist/runtime/type-guards/isNumericString.d.ts +8 -0
  288. package/dist/runtime/type-guards/isNumericString.d.ts.map +1 -1
  289. package/dist/runtime/type-guards/isNumericString.js +11 -0
  290. package/dist/runtime/type-guards/isPhoneNumber.d.ts +1 -1
  291. package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -1
  292. package/dist/runtime/type-guards/isPhoneNumber.js +16 -10
  293. package/dist/runtime/type-guards/isRegExp.d.ts +17 -0
  294. package/dist/runtime/type-guards/isRegExp.d.ts.map +1 -0
  295. package/dist/runtime/type-guards/isRegExp.js +32 -0
  296. package/dist/runtime/type-guards/isRuntimeUnion.d.ts.map +1 -1
  297. package/dist/runtime/type-guards/isSpecificConstant.d.ts.map +1 -1
  298. package/dist/runtime/type-guards/isTrimmable.d.ts.map +1 -1
  299. package/dist/runtime/type-guards/isTruthy.d.ts.map +1 -1
  300. package/dist/runtime/type-guards/isUnset.d.ts.map +1 -1
  301. package/dist/runtime/type-guards/isUrl.d.ts +3 -3
  302. package/dist/runtime/type-guards/isUrl.d.ts.map +1 -1
  303. package/dist/runtime/type-guards/network-tg.d.ts +6 -7
  304. package/dist/runtime/type-guards/network-tg.d.ts.map +1 -1
  305. package/dist/runtime/type-guards/network-tg.js +4 -9
  306. package/dist/runtime/type-guards/repos.d.ts +9 -7
  307. package/dist/runtime/type-guards/repos.d.ts.map +1 -1
  308. package/dist/runtime/type-guards/repos.js +1 -3
  309. package/dist/runtime/type-guards/tokens/index.d.ts +6 -0
  310. package/dist/runtime/type-guards/tokens/index.d.ts.map +1 -0
  311. package/dist/runtime/type-guards/tokens/index.js +5 -0
  312. package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts +9 -0
  313. package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts.map +1 -0
  314. package/dist/runtime/type-guards/tokens/isAtomicToken.js +12 -0
  315. package/dist/runtime/type-guards/tokens/isContainerToken.d.ts +21 -0
  316. package/dist/runtime/type-guards/tokens/isContainerToken.d.ts.map +1 -0
  317. package/dist/runtime/type-guards/tokens/isContainerToken.js +48 -0
  318. package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts +4 -0
  319. package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts.map +1 -0
  320. package/dist/runtime/type-guards/tokens/isFunctionToken.js +7 -0
  321. package/dist/runtime/type-guards/tokens/isShapeToken.d.ts +9 -0
  322. package/dist/runtime/type-guards/tokens/isShapeToken.d.ts.map +1 -0
  323. package/dist/runtime/type-guards/tokens/isShapeToken.js +21 -0
  324. package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts +53 -0
  325. package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts.map +1 -0
  326. package/dist/runtime/type-guards/tokens/isSimpleToken.js +74 -0
  327. package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts +9 -0
  328. package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts.map +1 -0
  329. package/dist/runtime/type-guards/tokens/isSingletonToken.js +12 -0
  330. package/dist/runtime/type-guards/tokens/isTupleToken.d.ts +1 -0
  331. package/dist/runtime/type-guards/tokens/isTupleToken.d.ts.map +1 -0
  332. package/dist/runtime/type-guards/tokens/isTupleToken.js +1 -0
  333. package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts +1 -0
  334. package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts.map +1 -0
  335. package/dist/runtime/type-guards/tokens/isUnionSetToken.js +1 -0
  336. package/dist/runtime/type-guards/tokens/isUnionToken.d.ts +9 -0
  337. package/dist/runtime/type-guards/tokens/isUnionToken.d.ts.map +1 -0
  338. package/dist/runtime/type-guards/tokens/isUnionToken.js +12 -0
  339. package/dist/runtime/type-guards/youtube.d.ts +5 -5
  340. package/dist/runtime/type-guards/youtube.d.ts.map +1 -1
  341. package/dist/runtime/type-guards/youtube.js +1 -3
  342. package/dist/runtime/vuejs/asVueRef.d.ts +1 -1
  343. package/dist/runtime/vuejs/asVueRef.d.ts.map +1 -1
  344. package/dist/types/base-types/LikeRegExp.d.ts +9 -0
  345. package/dist/types/base-types/LikeRegExp.d.ts.map +1 -0
  346. package/dist/types/base-types/Something.d.ts.map +1 -1
  347. package/dist/types/base-types/Something.js +1 -0
  348. package/dist/types/base-types/fns/AnyFunction.d.ts.map +1 -1
  349. package/dist/types/base-types/fns/AnyFunction.js +1 -1
  350. package/dist/types/base-types/fns/FnAllowingProps.d.ts +11 -0
  351. package/dist/types/base-types/fns/FnAllowingProps.d.ts.map +1 -0
  352. package/dist/types/base-types/fns/index.d.ts +1 -2
  353. package/dist/types/base-types/fns/index.d.ts.map +1 -1
  354. package/dist/types/base-types/fns/index.js +1 -2
  355. package/dist/types/base-types/index.d.ts +1 -0
  356. package/dist/types/base-types/index.d.ts.map +1 -1
  357. package/dist/types/base-types/index.js +1 -0
  358. package/dist/types/boolean-logic/branching/OnPass.d.ts.map +1 -1
  359. package/dist/types/boolean-logic/combinators/Compare.d.ts.map +1 -1
  360. package/dist/types/boolean-logic/operators/AreSameLength.d.ts +2 -2
  361. package/dist/types/boolean-logic/operators/AreSameLength.d.ts.map +1 -1
  362. package/dist/types/boolean-logic/operators/Contains.d.ts +4 -3
  363. package/dist/types/boolean-logic/operators/Contains.d.ts.map +1 -1
  364. package/dist/types/boolean-logic/operators/HasArray.d.ts +10 -0
  365. package/dist/types/boolean-logic/operators/HasArray.d.ts.map +1 -0
  366. package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts +1 -2
  367. package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts.map +1 -1
  368. package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts +9 -0
  369. package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts.map +1 -0
  370. package/dist/types/boolean-logic/operators/HaveSameNumericSign.js +1 -0
  371. package/dist/types/boolean-logic/operators/IsEmptyString.d.ts +12 -0
  372. package/dist/types/boolean-logic/operators/IsEmptyString.d.ts.map +1 -0
  373. package/dist/types/boolean-logic/operators/IsEmptyString.js +1 -0
  374. package/dist/types/boolean-logic/operators/IsFloat.d.ts +2 -2
  375. package/dist/types/boolean-logic/operators/IsFloat.d.ts.map +1 -1
  376. package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts +8 -2
  377. package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
  378. package/dist/types/boolean-logic/operators/IsInteger.d.ts +2 -2
  379. package/dist/types/boolean-logic/operators/IsInteger.d.ts.map +1 -1
  380. package/dist/types/boolean-logic/operators/IsLessThan.d.ts +8 -2
  381. package/dist/types/boolean-logic/operators/IsLessThan.d.ts.map +1 -1
  382. package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts +2 -4
  383. package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts.map +1 -1
  384. package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts +1 -1
  385. package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts.map +1 -1
  386. package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts +11 -0
  387. package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts.map +1 -0
  388. package/dist/types/boolean-logic/operators/IsPositiveNumber.js +1 -0
  389. package/dist/types/boolean-logic/operators/IsTuple.d.ts +1 -1
  390. package/dist/types/boolean-logic/operators/IsUrl.d.ts +7 -8
  391. package/dist/types/boolean-logic/operators/IsUrl.d.ts.map +1 -1
  392. package/dist/types/boolean-logic/operators/MaybeError.d.ts +20 -0
  393. package/dist/types/boolean-logic/operators/MaybeError.d.ts.map +1 -0
  394. package/dist/types/boolean-logic/operators/MaybeError.js +2 -0
  395. package/dist/types/boolean-logic/operators/PhoneOperators.d.ts +2 -3
  396. package/dist/types/boolean-logic/operators/PhoneOperators.d.ts.map +1 -1
  397. package/dist/types/boolean-logic/operators/StartsWith.d.ts +8 -9
  398. package/dist/types/boolean-logic/operators/StartsWith.d.ts.map +1 -1
  399. package/dist/types/boolean-logic/operators/UnionHasArray.d.ts +14 -0
  400. package/dist/types/boolean-logic/operators/UnionHasArray.d.ts.map +1 -0
  401. package/dist/types/boolean-logic/operators/UnionHasArray.js +1 -0
  402. package/dist/types/boolean-logic/operators/index.d.ts +6 -0
  403. package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
  404. package/dist/types/boolean-logic/operators/index.js +6 -0
  405. package/dist/types/containers/RemoveEmpty.d.ts +30 -0
  406. package/dist/types/containers/RemoveEmpty.d.ts.map +1 -0
  407. package/dist/types/containers/RemoveEmpty.js +1 -0
  408. package/dist/types/containers/RemoveMarked.d.ts +1 -1
  409. package/dist/types/containers/RemoveMarked.d.ts.map +1 -1
  410. package/dist/types/containers/RemoveUndefined.d.ts +1 -7
  411. package/dist/types/containers/RemoveUndefined.d.ts.map +1 -1
  412. package/dist/types/containers/index.d.ts +1 -0
  413. package/dist/types/containers/index.d.ts.map +1 -1
  414. package/dist/types/containers/index.js +1 -0
  415. package/dist/types/dictionary/EnsureKeys.d.ts +1 -3
  416. package/dist/types/dictionary/EnsureKeys.d.ts.map +1 -1
  417. package/dist/types/dictionary/Keys.d.ts +2 -2
  418. package/dist/types/dictionary/Keys.d.ts.map +1 -1
  419. package/dist/types/dictionary/OptionalKeys.d.ts +2 -2
  420. package/dist/types/dictionary/OptionalKeys.d.ts.map +1 -1
  421. package/dist/types/dictionary/OptionalKeys.js +0 -1
  422. package/dist/types/dictionary/RequireProps.d.ts +2 -2
  423. package/dist/types/dictionary/RequireProps.d.ts.map +1 -1
  424. package/dist/types/dictionary/RequiredKeys.d.ts +2 -2
  425. package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
  426. package/dist/types/dictionary/WithValue.d.ts +2 -3
  427. package/dist/types/dictionary/WithValue.d.ts.map +1 -1
  428. package/dist/types/dictionary/WithoutKeys.d.ts +3 -3
  429. package/dist/types/dictionary/WithoutKeys.d.ts.map +1 -1
  430. package/dist/types/functional/Result.d.ts +1 -1
  431. package/dist/types/functional/Result.d.ts.map +1 -1
  432. package/dist/types/functions/FnFrom.d.ts +1 -1
  433. package/dist/types/functions/FnFrom.d.ts.map +1 -1
  434. package/dist/types/functions/FnWithProps.d.ts +10 -0
  435. package/dist/types/functions/FnWithProps.d.ts.map +1 -0
  436. package/dist/types/functions/FnWithProps.js +1 -0
  437. package/dist/types/functions/IdentityFn.d.ts +1 -2
  438. package/dist/types/functions/IdentityFn.d.ts.map +1 -1
  439. package/dist/types/functions/index.d.ts +1 -0
  440. package/dist/types/functions/index.d.ts.map +1 -1
  441. package/dist/types/functions/index.js +1 -0
  442. package/dist/types/index.d.ts +1 -0
  443. package/dist/types/index.d.ts.map +1 -1
  444. package/dist/types/index.js +1 -0
  445. package/dist/types/lists/AsArray.d.ts +7 -2
  446. package/dist/types/lists/AsArray.d.ts.map +1 -1
  447. package/dist/types/lists/BeforeLast.d.ts +3 -3
  448. package/dist/types/lists/Filter.d.ts +2 -9
  449. package/dist/types/lists/Filter.d.ts.map +1 -1
  450. package/dist/types/lists/FilterByProp.d.ts +37 -0
  451. package/dist/types/lists/FilterByProp.d.ts.map +1 -0
  452. package/dist/types/lists/FilterByProp.js +1 -0
  453. package/dist/types/lists/Flatten.d.ts +31 -14
  454. package/dist/types/lists/Flatten.d.ts.map +1 -1
  455. package/dist/types/lists/Last.d.ts +2 -2
  456. package/dist/types/lists/Last.d.ts.map +1 -1
  457. package/dist/types/lists/Length.d.ts +3 -4
  458. package/dist/types/lists/Length.d.ts.map +1 -1
  459. package/dist/types/lists/RetainByProp.d.ts +38 -0
  460. package/dist/types/lists/RetainByProp.d.ts.map +1 -0
  461. package/dist/types/lists/RetainByProp.js +1 -0
  462. package/dist/types/lists/Shift.d.ts +5 -3
  463. package/dist/types/lists/Shift.d.ts.map +1 -1
  464. package/dist/types/lists/Slice.d.ts +17 -9
  465. package/dist/types/lists/Slice.d.ts.map +1 -1
  466. package/dist/types/lists/TakeFirst.d.ts +21 -0
  467. package/dist/types/lists/TakeFirst.d.ts.map +1 -0
  468. package/dist/types/lists/TakeFirst.js +1 -0
  469. package/dist/types/lists/TakeLast.d.ts +16 -0
  470. package/dist/types/lists/TakeLast.d.ts.map +1 -0
  471. package/dist/types/lists/TakeLast.js +1 -0
  472. package/dist/types/lists/index.d.ts +4 -0
  473. package/dist/types/lists/index.d.ts.map +1 -1
  474. package/dist/types/lists/index.js +4 -0
  475. package/dist/types/literals/BooleanLike.d.ts +8 -0
  476. package/dist/types/literals/BooleanLike.d.ts.map +1 -0
  477. package/dist/types/literals/BooleanLike.js +1 -0
  478. package/dist/types/literals/NarrowableDefined.d.ts +2 -1
  479. package/dist/types/literals/NarrowableDefined.d.ts.map +1 -1
  480. package/dist/types/literals/NarrowableDefined.js +0 -1
  481. package/dist/types/literals/Shape.d.ts +10 -1
  482. package/dist/types/literals/Shape.d.ts.map +1 -1
  483. package/dist/types/literals/index.d.ts +1 -0
  484. package/dist/types/literals/index.d.ts.map +1 -1
  485. package/dist/types/literals/index.js +1 -0
  486. package/dist/types/numeric-literals/Abs.d.ts +2 -2
  487. package/dist/types/numeric-literals/Abs.d.ts.map +1 -1
  488. package/dist/types/numeric-literals/Add.d.ts +5 -3
  489. package/dist/types/numeric-literals/Add.d.ts.map +1 -1
  490. package/dist/types/numeric-literals/AsNegativeNumber.d.ts +12 -0
  491. package/dist/types/numeric-literals/AsNegativeNumber.d.ts.map +1 -0
  492. package/dist/types/numeric-literals/AsNegativeNumber.js +1 -0
  493. package/dist/types/numeric-literals/CSV.d.ts +73 -0
  494. package/dist/types/numeric-literals/CSV.d.ts.map +1 -0
  495. package/dist/types/numeric-literals/CSV.js +1 -0
  496. package/dist/types/numeric-literals/Delta.d.ts +14 -0
  497. package/dist/types/numeric-literals/Delta.d.ts.map +1 -0
  498. package/dist/types/numeric-literals/Delta.js +1 -0
  499. package/dist/types/numeric-literals/Digit.d.ts +2 -3
  500. package/dist/types/numeric-literals/Digit.d.ts.map +1 -1
  501. package/dist/types/numeric-literals/Digitize.d.ts +10 -20
  502. package/dist/types/numeric-literals/Digitize.d.ts.map +1 -1
  503. package/dist/types/numeric-literals/Increment.d.ts +2 -5
  504. package/dist/types/numeric-literals/Increment.d.ts.map +1 -1
  505. package/dist/types/numeric-literals/InvertNumericSign.d.ts +9 -0
  506. package/dist/types/numeric-literals/InvertNumericSign.d.ts.map +1 -0
  507. package/dist/types/numeric-literals/InvertNumericSign.js +1 -0
  508. package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -1
  509. package/dist/types/numeric-literals/Subtract.d.ts +11 -8
  510. package/dist/types/numeric-literals/Subtract.d.ts.map +1 -1
  511. package/dist/types/numeric-literals/Zero.d.ts +8 -0
  512. package/dist/types/numeric-literals/Zero.d.ts.map +1 -0
  513. package/dist/types/numeric-literals/Zero.js +1 -0
  514. package/dist/types/numeric-literals/index.d.ts +5 -0
  515. package/dist/types/numeric-literals/index.d.ts.map +1 -1
  516. package/dist/types/numeric-literals/index.js +5 -0
  517. package/dist/types/queues/FifoQueue.d.ts +31 -0
  518. package/dist/types/queues/FifoQueue.d.ts.map +1 -0
  519. package/dist/types/queues/FifoQueue.js +1 -0
  520. package/dist/types/queues/LifoQueue.d.ts +31 -0
  521. package/dist/types/queues/LifoQueue.d.ts.map +1 -0
  522. package/dist/types/queues/LifoQueue.js +1 -0
  523. package/dist/types/queues/index.d.ts +3 -0
  524. package/dist/types/queues/index.d.ts.map +1 -0
  525. package/dist/types/queues/index.js +2 -0
  526. package/dist/types/runtime-types/AsType.d.ts +16 -0
  527. package/dist/types/runtime-types/AsType.d.ts.map +1 -0
  528. package/dist/types/runtime-types/AsType.js +1 -0
  529. package/dist/types/runtime-types/SimpleType.d.ts +47 -0
  530. package/dist/types/runtime-types/SimpleType.d.ts.map +1 -0
  531. package/dist/types/runtime-types/SimpleType.js +1 -0
  532. package/dist/types/runtime-types/Type.d.ts +1 -1
  533. package/dist/types/runtime-types/Type.d.ts.map +1 -1
  534. package/dist/types/runtime-types/TypeOf.d.ts +1 -1
  535. package/dist/types/runtime-types/TypeOf.d.ts.map +1 -1
  536. package/dist/types/runtime-types/TypeToken.d.ts +119 -9
  537. package/dist/types/runtime-types/TypeToken.d.ts.map +1 -1
  538. package/dist/types/runtime-types/index.d.ts +2 -1
  539. package/dist/types/runtime-types/index.d.ts.map +1 -1
  540. package/dist/types/runtime-types/index.js +2 -1
  541. package/dist/types/sets/Intersection.d.ts +1 -1
  542. package/dist/types/sets/Intersection.d.ts.map +1 -1
  543. package/dist/types/string-literals/Date.d.ts +4 -4
  544. package/dist/types/string-literals/Date.d.ts.map +1 -1
  545. package/dist/types/string-literals/EnsureLeading.d.ts +10 -6
  546. package/dist/types/string-literals/EnsureLeading.d.ts.map +1 -1
  547. package/dist/types/string-literals/EnsureTrailing.d.ts +5 -6
  548. package/dist/types/string-literals/EnsureTrailing.d.ts.map +1 -1
  549. package/dist/types/string-literals/Join.d.ts +3 -2
  550. package/dist/types/string-literals/Join.d.ts.map +1 -1
  551. package/dist/types/string-literals/Proxmox.d.ts +2 -3
  552. package/dist/types/string-literals/Proxmox.d.ts.map +1 -1
  553. package/dist/types/string-literals/Split.d.ts +1 -1
  554. package/dist/types/string-literals/Split.d.ts.map +1 -1
  555. package/dist/types/string-literals/StripLeading.d.ts +2 -2
  556. package/dist/types/string-literals/StripLeading.d.ts.map +1 -1
  557. package/dist/types/string-literals/StripSurround.d.ts +16 -0
  558. package/dist/types/string-literals/StripSurround.d.ts.map +1 -0
  559. package/dist/types/string-literals/StripSurround.js +1 -0
  560. package/dist/types/string-literals/StripTrailing.d.ts +2 -2
  561. package/dist/types/string-literals/StripTrailing.d.ts.map +1 -1
  562. package/dist/types/string-literals/StripUntil.d.ts +1 -1
  563. package/dist/types/string-literals/StripUntil.d.ts.map +1 -1
  564. package/dist/types/string-literals/Suggest.d.ts.map +1 -1
  565. package/dist/types/string-literals/Surround.d.ts +2 -2
  566. package/dist/types/string-literals/Surround.d.ts.map +1 -1
  567. package/dist/types/string-literals/Truncate.d.ts +4 -4
  568. package/dist/types/string-literals/Truncate.d.ts.map +1 -1
  569. package/dist/types/string-literals/UnderlyingType.d.ts +18 -0
  570. package/dist/types/string-literals/UnderlyingType.d.ts.map +1 -0
  571. package/dist/types/string-literals/UnderlyingType.js +1 -0
  572. package/dist/types/string-literals/character-sets/Consonants.d.ts +3 -4
  573. package/dist/types/string-literals/character-sets/Consonants.d.ts.map +1 -1
  574. package/dist/types/string-literals/character-sets/DomainName.d.ts +1 -1
  575. package/dist/types/string-literals/character-sets/DomainName.d.ts.map +1 -1
  576. package/dist/types/string-literals/character-sets/IpAddress.d.ts +1 -1
  577. package/dist/types/string-literals/character-sets/IpAddress.d.ts.map +1 -1
  578. package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts +2 -3
  579. package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts.map +1 -1
  580. package/dist/types/string-literals/character-sets/NumericChar.d.ts +3 -4
  581. package/dist/types/string-literals/character-sets/NumericChar.d.ts.map +1 -1
  582. package/dist/types/string-literals/character-sets/Repos.d.ts +2 -1
  583. package/dist/types/string-literals/character-sets/Repos.d.ts.map +1 -1
  584. package/dist/types/string-literals/character-sets/SingularNoun.d.ts +1 -1
  585. package/dist/types/string-literals/character-sets/SingularNoun.d.ts.map +1 -1
  586. package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts +2 -3
  587. package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts.map +1 -1
  588. package/dist/types/string-literals/character-sets/Url.d.ts +4 -3
  589. package/dist/types/string-literals/character-sets/Url.d.ts.map +1 -1
  590. package/dist/types/string-literals/character-sets/Url.js +0 -1
  591. package/dist/types/string-literals/character-sets/Whitespace.d.ts +1 -1
  592. package/dist/types/string-literals/character-sets/Whitespace.d.ts.map +1 -1
  593. package/dist/types/string-literals/character-sets/css/color.d.ts +24 -0
  594. package/dist/types/string-literals/character-sets/css/color.d.ts.map +1 -0
  595. package/dist/types/string-literals/character-sets/css/color.js +1 -0
  596. package/dist/types/string-literals/character-sets/css/display-position.d.ts +26 -0
  597. package/dist/types/string-literals/character-sets/css/display-position.d.ts.map +1 -0
  598. package/dist/types/string-literals/character-sets/css/display-position.js +1 -0
  599. package/dist/types/string-literals/character-sets/css/index.d.ts +4 -0
  600. package/dist/types/string-literals/character-sets/css/index.d.ts.map +1 -0
  601. package/dist/types/string-literals/character-sets/css/index.js +3 -0
  602. package/dist/types/string-literals/character-sets/css/sizing.d.ts +10 -0
  603. package/dist/types/string-literals/character-sets/css/sizing.d.ts.map +1 -0
  604. package/dist/types/string-literals/character-sets/css/sizing.js +1 -0
  605. package/dist/types/string-literals/character-sets/index.d.ts +3 -2
  606. package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
  607. package/dist/types/string-literals/character-sets/index.js +3 -2
  608. package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts +12 -0
  609. package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts.map +1 -0
  610. package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.js +1 -0
  611. package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts +9 -0
  612. package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts.map +1 -0
  613. package/dist/types/string-literals/character-sets/phone/DialCountryCode.js +1 -0
  614. package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts +14 -0
  615. package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts.map +1 -0
  616. package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.js +1 -0
  617. package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts +10 -0
  618. package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts.map +1 -0
  619. package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.js +1 -0
  620. package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts +12 -0
  621. package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts.map +1 -0
  622. package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.js +1 -0
  623. package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts +12 -0
  624. package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts.map +1 -0
  625. package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.js +1 -0
  626. package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts +6 -0
  627. package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts.map +1 -0
  628. package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.js +1 -0
  629. package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts +13 -0
  630. package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts.map +1 -0
  631. package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.js +1 -0
  632. package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts +23 -0
  633. package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts.map +1 -0
  634. package/dist/types/string-literals/character-sets/phone/PhoneNumber.js +1 -0
  635. package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts +5 -0
  636. package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts.map +1 -0
  637. package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.js +1 -0
  638. package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts +19 -0
  639. package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts.map +1 -0
  640. package/dist/types/string-literals/character-sets/phone/PhoneShortCode.js +1 -0
  641. package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts +30 -0
  642. package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts.map +1 -0
  643. package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.js +1 -0
  644. package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts +27 -0
  645. package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts.map +1 -0
  646. package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.js +1 -0
  647. package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts +17 -0
  648. package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts.map +1 -0
  649. package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.js +1 -0
  650. package/dist/types/string-literals/character-sets/phone/index.d.ts +15 -0
  651. package/dist/types/string-literals/character-sets/phone/index.d.ts.map +1 -0
  652. package/dist/types/string-literals/character-sets/phone/index.js +14 -0
  653. package/dist/types/string-literals/character-sets/phone.d.ts +0 -187
  654. package/dist/types/string-literals/character-sets/phone.d.ts.map +1 -1
  655. package/dist/types/string-literals/character-sets/tw/TwColor.d.ts +41 -0
  656. package/dist/types/string-literals/character-sets/tw/TwColor.d.ts.map +1 -0
  657. package/dist/types/string-literals/character-sets/tw/TwColor.js +1 -0
  658. package/dist/types/string-literals/character-sets/tw/index.d.ts +2 -0
  659. package/dist/types/string-literals/character-sets/tw/index.d.ts.map +1 -0
  660. package/dist/types/string-literals/character-sets/tw/index.js +1 -0
  661. package/dist/types/string-literals/geo/state.d.ts +1 -1
  662. package/dist/types/string-literals/geo/state.d.ts.map +1 -1
  663. package/dist/types/string-literals/geo/zip.d.ts +1 -1
  664. package/dist/types/string-literals/geo/zip.d.ts.map +1 -1
  665. package/dist/types/string-literals/index.d.ts +2 -0
  666. package/dist/types/string-literals/index.d.ts.map +1 -1
  667. package/dist/types/string-literals/index.js +2 -0
  668. package/dist/types/tsconfig.tsbuildinfo +1 -1
  669. package/dist/types/type-conversion/AsBoolean.d.ts +7 -4
  670. package/dist/types/type-conversion/AsBoolean.d.ts.map +1 -1
  671. package/dist/types/type-conversion/AsNumber.d.ts +8 -3
  672. package/dist/types/type-conversion/AsNumber.d.ts.map +1 -1
  673. package/dist/types/type-conversion/AsString.d.ts +3 -1
  674. package/dist/types/type-conversion/AsString.d.ts.map +1 -1
  675. package/dist/types/type-conversion/AsStringUnion.d.ts +25 -0
  676. package/dist/types/type-conversion/AsStringUnion.d.ts.map +1 -0
  677. package/dist/types/type-conversion/AsStringUnion.js +1 -0
  678. package/dist/types/type-conversion/JSON.d.ts +25 -0
  679. package/dist/types/type-conversion/JSON.d.ts.map +1 -0
  680. package/dist/types/type-conversion/JSON.js +1 -0
  681. package/dist/types/type-conversion/StringLiteralFromTuple.d.ts +18 -0
  682. package/dist/types/type-conversion/StringLiteralFromTuple.d.ts.map +1 -0
  683. package/dist/types/type-conversion/StringLiteralFromTuple.js +1 -0
  684. package/dist/types/type-conversion/StripChars.d.ts +7 -6
  685. package/dist/types/type-conversion/StripChars.d.ts.map +1 -1
  686. package/dist/types/type-conversion/ToJsonValue.d.ts +11 -0
  687. package/dist/types/type-conversion/ToJsonValue.d.ts.map +1 -0
  688. package/dist/types/type-conversion/ToJsonValue.js +1 -0
  689. package/dist/types/type-conversion/ToStringArray.d.ts +4 -3
  690. package/dist/types/type-conversion/ToStringArray.d.ts.map +1 -1
  691. package/dist/types/type-conversion/TupleToUnion.d.ts +2 -2
  692. package/dist/types/type-conversion/TupleToUnion.d.ts.map +1 -1
  693. package/dist/types/type-conversion/Widen.js +1 -0
  694. package/dist/types/type-conversion/index.d.ts +4 -0
  695. package/dist/types/type-conversion/index.d.ts.map +1 -1
  696. package/dist/types/type-conversion/index.js +4 -0
  697. package/package.json +38 -37
  698. package/dist/runtime/lists/pop.d.ts +0 -17
  699. package/dist/runtime/lists/pop.d.ts.map +0 -1
  700. package/dist/runtime/lists/pop.js +0 -16
  701. package/dist/runtime/literals/asPhoneNumber.d.ts +0 -10
  702. package/dist/runtime/literals/asPhoneNumber.d.ts.map +0 -1
  703. package/dist/runtime/literals/asPhoneNumber.js +0 -62
  704. package/dist/runtime/runtime-types/dict.d.ts +0 -10
  705. package/dist/runtime/runtime-types/dict.d.ts.map +0 -1
  706. package/dist/runtime/runtime-types/dict.js +0 -11
  707. package/dist/runtime/runtime-types/parse.d.ts +0 -16
  708. package/dist/runtime/runtime-types/parse.d.ts.map +0 -1
  709. package/dist/runtime/runtime-types/parse.js +0 -29
  710. package/dist/types/base-types/fns/AnyFnWithDict.d.ts +0 -9
  711. package/dist/types/base-types/fns/AnyFnWithDict.d.ts.map +0 -1
  712. package/dist/types/base-types/fns/FnWithDict.d.ts +0 -10
  713. package/dist/types/base-types/fns/FnWithDict.d.ts.map +0 -1
  714. package/dist/types/runtime-types/DescribeType.d.ts +0 -40
  715. package/dist/types/runtime-types/DescribeType.d.ts.map +0 -1
  716. package/dist/types/runtime-types/DescribeType.js +0 -2
  717. package/dist/types/string-literals/character-sets/CSS.d.ts +0 -13
  718. package/dist/types/string-literals/character-sets/CSS.d.ts.map +0 -1
  719. /package/dist/types/base-types/{fns/AnyFnWithDict.js → LikeRegExp.js} +0 -0
  720. /package/dist/types/base-types/fns/{FnWithDict.js → FnAllowingProps.js} +0 -0
  721. /package/dist/types/{string-literals/character-sets/CSS.js → boolean-logic/operators/HasArray.js} +0 -0
@@ -11,7 +11,9 @@ import { ensureLeading, ensureTrailing } from "../index.js";
11
11
  */
12
12
  export function ensureSurround(prefix, postfix) {
13
13
  const fn = (input) => {
14
- const result = ensureTrailing(ensureLeading(input, prefix), postfix);
14
+ let result = input;
15
+ result = ensureLeading(result, prefix);
16
+ result = ensureTrailing(result, postfix);
15
17
  return result;
16
18
  };
17
19
  return fn;
@@ -1 +1 @@
1
- {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/identity.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,QAAQ,SAGhB,CAAC,MACA,CAAC"}
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/identity.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,QAAQ,GACnB,CAAC,KAEE,CAAC,MACA,CAAC"}
@@ -26,6 +26,7 @@ export * from "./retainAfter";
26
26
  export * from "./surround";
27
27
  export * from "./stripAfter";
28
28
  export * from "./stripBefore";
29
+ export * from "./stripSurround";
29
30
  export * from "./stripUntil";
30
31
  export * from "./trim";
31
32
  export * from "./toPascalCase";
@@ -36,5 +37,5 @@ export * from "./takeNumericCharacters";
36
37
  export * from "./retainChars";
37
38
  export * from "./stripChars";
38
39
  export * from "./retainWhile";
39
- export * from "./asPhoneNumber";
40
+ export * from "./phone/index";
40
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/index.ts"],"names":[],"mappings":"AAMA,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/index.ts"],"names":[],"mappings":"AAMA,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAG9B,cAAc,eAAe,CAAC"}
@@ -31,6 +31,7 @@ export * from "./retainAfter.js";
31
31
  export * from "./surround.js";
32
32
  export * from "./stripAfter.js";
33
33
  export * from "./stripBefore.js";
34
+ export * from "./stripSurround.js";
34
35
  export * from "./stripUntil.js";
35
36
  export * from "./trim.js";
36
37
  export * from "./toPascalCase.js";
@@ -41,7 +42,7 @@ export * from "./takeNumericCharacters.js";
41
42
  export * from "./retainChars.js";
42
43
  export * from "./stripChars.js";
43
44
  export * from "./retainWhile.js";
44
- export * from "./asPhoneNumber.js";
45
+ export * from "./phone/index.js";
45
46
  // #endregion auto-indexed files
46
47
  // see https://github.com/inocan-group/do-devops/docs/autoindex.md
47
48
  // for more info
@@ -1 +1 @@
1
- {"version":3,"file":"narrow.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/narrow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,YAAY,EACb,0BAAwB;AAEzB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CACpB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EACtC,GAAG,MAAM,EAAE,CAAC,iOAeb"}
1
+ {"version":3,"file":"narrow.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/narrow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,YAAY,EACb,0BAAwB;AAEzB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CACpB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EACtC,GAAG,MAAM,EAAE,CAAC,GAKI,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAC/B,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,GAC7B,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,GACpB,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,SAAS,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GACrD,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACnC,CAAC,CAAC,CAAC,CAAC,GAER,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAChB,CAAC,CAAC,CAAC,CAAC,GACN,QAAQ,CAAC,CAAC,CAAC,CAChB"}
@@ -0,0 +1,2 @@
1
+ export declare const asPhoneFormat: () => string;
2
+ //# sourceMappingURL=asPhoneNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/asPhoneNumber.ts"],"names":[],"mappings":"AAuEA,eAAO,MAAM,aAAa,cAA0B,CAAA"}
@@ -0,0 +1,62 @@
1
+ // const convert = (
2
+ // countryCode: string,
3
+ // phone: string,
4
+ // delimiter: string,
5
+ // para: boolean
6
+ // ) => {
7
+ // const chars: string = stripChars(phone, "(", ")") as string;
8
+ // const parts: string[] = chars.trim().split(/[-. ]/);
9
+ // const isRegional = parts.length === 2 ? true : false;
10
+ // const isCountry = parts.length === 3 ? true : false;
11
+ // const isShortCode = parts.length === 1 && phone.split("").length < 7 ? true : false;
12
+ // const replacement = isShortCode
13
+ // ? phone
14
+ // : isRegional
15
+ // ? parts.join(delimiter)
16
+ // : isCountry && para
17
+ // ? `(${parts[0]}) ${parts.slice(1).join(delimiter)}`
18
+ // : isCountry
19
+ // ? parts.join(delimiter)
20
+ // : undefined;
21
+ // if (!replacement) {
22
+ // throw new Error(`invalid phone number: ${phone}. Unable to parse!`)
23
+ // }
24
+ // return countryCode === ""
25
+ // ? replacement
26
+ // : `+${countryCode} ${replacement}`;
27
+ // }
28
+ // /**
29
+ // * **asPhoneNumber**`(phone, format)`
30
+ // *
31
+ // * Receives a phone number and returns it as a well formatted version.
32
+ // */
33
+ // export const asPhoneNumber = <
34
+ // T extends string,
35
+ // F extends PhoneFormat,
36
+ // >(
37
+ // phone: T & PhoneNumber<T>,
38
+ // format: F = "Dotted (e.g., 456.555.1212)" as F
39
+ // ) => {
40
+ // if (!isPhoneNumber(phone)) {
41
+ // throw new Error(`Invalid phone number presented to asPhoneNumber(phone,format)!`);
42
+ // }
43
+ // const countryCode = getPhoneCountryCode(phone) as unknown as string;
44
+ // const remaining = removePhoneCountryCode(phone) as unknown as string;
45
+ // let result: unknown;
46
+ // switch (format) {
47
+ // case "Dashed (e.g., 456-555-1212)":
48
+ // result = convert(countryCode, remaining, "-", false) as unknown;
49
+ // break;
50
+ // case "Dotted (e.g., 456.555.1212)":
51
+ // result = convert(countryCode, remaining, ".", false) as unknown;
52
+ // break;
53
+ // case "ParaDashed (e.g., (456) 555-1212)":
54
+ // result = convert(countryCode, remaining, "-", true) as unknown;
55
+ // break;
56
+ // case "ParaSpaced (e.g., (456) 555 1212)":
57
+ // result = convert(countryCode, remaining, " ", true) as unknown;
58
+ // break;
59
+ // }
60
+ // return result ;
61
+ // }
62
+ export const asPhoneFormat = () => `NOT IMPLEMENTED`;
@@ -0,0 +1,3 @@
1
+ import { GetPhoneCountryCode } from "../../../types/index";
2
+ export declare const getPhoneCountryCode: <T extends string>(phone: T) => GetPhoneCountryCode<T>;
3
+ //# sourceMappingURL=getPhoneCountryCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPhoneCountryCode.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/getPhoneCountryCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,6BAAwB;AAGtD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,MAAM,SAC3C,CAAC,KASQ,mBAAmB,CAAC,CAAC,CACtC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { NUMERIC_CHAR } from "../../../constants/NumericChar.js";
2
+ import { retainWhile, stripLeading } from "../../index.js";
3
+ export const getPhoneCountryCode = (phone) => {
4
+ return (phone.trim().startsWith("+") || phone.trim().startsWith("00")
5
+ ? retainWhile(stripLeading(stripLeading(phone.trim(), "+"), "00"), ...NUMERIC_CHAR)
6
+ : "");
7
+ };
@@ -0,0 +1,4 @@
1
+ export * from "./getPhoneCountryCode";
2
+ export * from "./removePhoneCountryCode";
3
+ export * from "./asPhoneNumber";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./getPhoneCountryCode.js";
2
+ export * from "./removePhoneCountryCode.js";
3
+ export * from "./asPhoneNumber.js";
@@ -0,0 +1,3 @@
1
+ import { RemovePhoneCountryCode } from "../../../types/index";
2
+ export declare const removePhoneCountryCode: <T extends string>(phone: T) => RemovePhoneCountryCode<T>;
3
+ //# sourceMappingURL=removePhoneCountryCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"removePhoneCountryCode.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/removePhoneCountryCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,6BAAwB;AAEzD,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,MAAM,SACT,CAAC,KASQ,sBAAsB,CAAC,CAAC,CACzC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { getPhoneCountryCode, stripLeading } from "../../index.js";
2
+ export const removePhoneCountryCode = (phone) => {
3
+ const countryCode = getPhoneCountryCode(phone);
4
+ return (countryCode !== ""
5
+ ? stripLeading(stripLeading(phone.trim(), "+", "00"), countryCode).trim()
6
+ : phone.trim());
7
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/pluralize.ts"],"names":[],"mappings":"AAMA,OAAO,EAAW,SAAS,EAAgB,0BAAwB;AA2CnE;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,2BAA4B,CAAC,KAAG,UAAU,CAAC,CAUhE,CAAC"}
1
+ {"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/pluralize.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,0BAAwB;AA+C5C;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,QAAQ,CAAC,KAAG,SAAS,CAAC,CAAC,CAUhE,CAAC"}
@@ -1,12 +1,15 @@
1
1
  import { ALPHA_CHARS, CONSONANTS, PLURAL_EXCEPTIONS, SINGULAR_NOUN_ENDINGS } from "../../constants/index.js";
2
2
  import { stripTrailing, split } from "../index.js";
3
3
  const isException = (word) => Object.keys(PLURAL_EXCEPTIONS).includes(word);
4
- const END_IN = [
4
+ const _END_IN = [
5
5
  "is",
6
6
  "y",
7
7
  "f",
8
8
  "singular-noun"
9
9
  ];
10
+ /**
11
+ * pluralize based on how word ends
12
+ */
10
13
  const endingIn = (word, postfix) => {
11
14
  switch (postfix) {
12
15
  case "is":
@@ -1 +1 @@
1
- {"version":3,"file":"retainAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,iCAIhC"}
1
+ {"version":3,"file":"retainAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAGO,WAAW,CAAC,QAAQ,EAAC,MAAM,CAAC,CACnE"}
@@ -1,4 +1,4 @@
1
- import { RetainChars, TupleToUnion } from "../../types/type-conversion";
1
+ import { RetainChars, TupleToUnion } from "../../types/index";
2
2
  /**
3
3
  * **retainChars**`(content, ...retain)`
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"retainChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,oCAAkC;AAGtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,wEAIb,QAAQ,aACN,OAAO,KACjB,YAAY,QAAQ,EAAE,aAAa,OAAO,CAAC,CAE7C,CAAA"}
1
+ {"version":3,"file":"retainChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,0BAAwB;AAG5D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,SAAS,MAAM,EACvB,OAAO,SAAS,SAAS,MAAM,EAAE,WAExB,QAAQ,aACN,OAAO,KACjB,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAK7C,CAAA"}
@@ -13,5 +13,6 @@ import { asChars } from "../type-conversion/asChars.js";
13
13
  * **Related:** `stripChars()`, `retainWhile()`, `retainUntil()`
14
14
  */
15
15
  export const retainChars = (content, ...retain) => {
16
- return asChars(content).filter(c => retain.includes(c)).join("");
16
+ let chars = asChars(content);
17
+ return chars.filter(c => retain.includes(c)).join("");
17
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"retainWhile.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,WAAW,EAAE,YAAY,EAAE,0BAAwB;AAI7D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,wEAIb,QAAQ,aACN,OAAO,iDAMnB,CAAA"}
1
+ {"version":3,"file":"retainWhile.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,WAAW,EAAE,YAAY,EAAE,0BAAwB;AAI7D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,SAAS,MAAM,EACvB,OAAO,SAAS,SAAS,MAAM,EAAE,WAExB,QAAQ,aACN,OAAO,KAK4B,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAC1F,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,KAAK,EAAE,OAAO,EAAE,0BAAwB;AAElD;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CACnB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAChB,GAAG,EAAE,CAAC,EAAE,GAAG,GAAE,CAAW,8DAEzB"}
1
+ {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,KAAK,EAAE,OAAO,EAAE,0BAAwB;AAElD;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CACnB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAChB,GAAG,EAAE,CAAC,EAAE,GAAG,GAAE,CAAW,GACY,OAAO,CAAC,CAAC,EAAC,EAAE,CAAC,SAAS,IAAI,GAAI,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,MAAM,EAAE,CAC/F"}
@@ -1 +1 @@
1
- {"version":3,"file":"stripAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAAwB;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,gCAEhC"}
1
+ {"version":3,"file":"stripAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAAwB;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GACkB,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAC9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"stripBefore.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripBefore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,iCAKhC"}
1
+ {"version":3,"file":"stripBefore.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripBefore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAIb,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAChD"}
@@ -1,4 +1,4 @@
1
- import { StripChars, TupleToUnion } from "../../types/type-conversion";
1
+ import { StripChars, TupleToUnion } from "../../types/index";
2
2
  /**
3
3
  * **stripChars**`(content, ...strip)`
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"stripChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,YAAY,EAAE,oCAAkC;AAGtE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,wEAIZ,QAAQ,YACP,OAAO,KAChB,WAAW,QAAQ,EAAE,aAAa,OAAO,CAAC,CAE5C,CAAA"}
1
+ {"version":3,"file":"stripChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,YAAY,EAAE,0BAAwB;AAG5D;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,SAAS,MAAM,EACvB,OAAO,SAAS,SAAS,MAAM,EAAE,WAExB,QAAQ,YACP,OAAO,KAChB,UAAU,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAM5C,CAAA"}
@@ -7,5 +7,6 @@ import { asChars } from "../type-conversion/asChars.js";
7
7
  * **Related:** `retainChars()`
8
8
  */
9
9
  export const stripChars = (content, ...strip) => {
10
- return asChars(content).filter(c => !strip.includes(c)).join("");
10
+ let chars = asChars(content);
11
+ return (chars.filter(c => !strip.includes(c)).join(""));
11
12
  };
@@ -5,5 +5,5 @@ import { StripLeading, TupleToUnion } from "../../types/index";
5
5
  * Runtime utility which strips of a leading substring from the
6
6
  * primary content if it exists and leaves content unchanged otherwise.
7
7
  */
8
- export declare function stripLeading<T extends string, U extends string[]>(content: T, ...strip: U): StripLeading<T, TupleToUnion<U>>;
8
+ export declare function stripLeading<T extends string | number, U extends readonly (string | number)[]>(content: T, ...strip: U): StripLeading<T, TupleToUnion<U>>;
9
9
  //# sourceMappingURL=stripLeading.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripLeading.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,0BAAwB;AAE7D;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAAE,EAElB,OAAO,EAAE,CAAC,EACV,GAAG,KAAK,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CASlC"}
1
+ {"version":3,"file":"stripLeading.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,0BAAwB;AAG7D;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAEtC,OAAO,EAAE,CAAC,EACV,GAAG,KAAK,EAAE,CAAC,GAYK,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CACjD"}
@@ -1,3 +1,4 @@
1
+ import { isNumber } from "../type-guards/isNumber.js";
1
2
  /**
2
3
  * **stripLeading**(content, ...strip)
3
4
  *
@@ -5,10 +6,11 @@
5
6
  * primary content if it exists and leaves content unchanged otherwise.
6
7
  */
7
8
  export function stripLeading(content, ...strip) {
8
- const stripper = strip.find(i => content.startsWith(i));
9
- return (stripper
10
- ? // starts with
11
- content.slice(stripper.length)
12
- : // does not
13
- content);
9
+ let output = String(content);
10
+ for (const s of strip) {
11
+ if (output.startsWith(String(s))) {
12
+ output = output.slice(String(s).length);
13
+ }
14
+ }
15
+ return (isNumber(content) ? Number(output) : output);
14
16
  }
@@ -0,0 +1,19 @@
1
+ import { StripSurround, TupleToUnion } from "../../types/index";
2
+ export type StripSurroundConfigured<TStrip extends readonly (string | number)[]> = <TInput extends string | number>(input: TInput) => StripSurround<TInput, TupleToUnion<TStrip>>;
3
+ /**
4
+ * **stripSurround**`(chars) => (input) => _stripped_`
5
+ *
6
+ * A higher order function which allows you to define a string literal
7
+ * stripping function for both the beginning and end of a string literal.
8
+ *
9
+ * ```ts
10
+ * // utility which will strip all starting and ending brackets
11
+ * const stripBrackets = stripSurround("(", ")", "[", "]", "{", "}");
12
+ * // " hello, world "
13
+ * const without = stripBrackets("[ hello, world ]")
14
+ * ```
15
+ *
16
+ * **Related**: `stripSurroundAndTrim`
17
+ */
18
+ export declare const stripSurround: <TChars extends readonly (number | string)[]>(...chars: TChars) => StripSurroundConfigured<TChars>;
19
+ //# sourceMappingURL=stripSurround.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripSurround.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripSurround.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EACb,YAAY,EACb,0BAAwB;AAEzB,MAAM,MAAM,uBAAuB,CACjC,MAAM,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,IACzC,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;AAGnG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,YAEjC,MAAM,KACf,uBAAuB,CAAC,MAAM,CAmBhC,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { isNumber, } from "../index.js";
2
+ /**
3
+ * **stripSurround**`(chars) => (input) => _stripped_`
4
+ *
5
+ * A higher order function which allows you to define a string literal
6
+ * stripping function for both the beginning and end of a string literal.
7
+ *
8
+ * ```ts
9
+ * // utility which will strip all starting and ending brackets
10
+ * const stripBrackets = stripSurround("(", ")", "[", "]", "{", "}");
11
+ * // " hello, world "
12
+ * const without = stripBrackets("[ hello, world ]")
13
+ * ```
14
+ *
15
+ * **Related**: `stripSurroundAndTrim`
16
+ */
17
+ export const stripSurround = (...chars) => {
18
+ return (input) => {
19
+ let output = String(input);
20
+ for (const s of chars) {
21
+ if (output.startsWith(String(s))) {
22
+ output = output.slice(String(s).length);
23
+ }
24
+ if (output.endsWith(String(s))) {
25
+ output = output.slice(0, -1 * String(s).length);
26
+ }
27
+ }
28
+ return (isNumber(input) ? Number(output) : output);
29
+ };
30
+ };
@@ -1,9 +1,9 @@
1
- import { StripTrailing } from "../../types/index";
1
+ import { StripTrailing, TupleToUnion } from "../../types/index";
2
2
  /**
3
3
  * **stripTrailing**(content, strip)
4
4
  *
5
5
  * Runtime utility which ensures that last part of a string has substring
6
6
  * removed if it exists and that strong typing is preserved.
7
7
  */
8
- export declare function stripTrailing<T extends string | number, U extends string | number>(content: T, strip: U): StripTrailing<T, U>;
8
+ export declare function stripTrailing<T extends string | number, U extends readonly (string | number)[]>(content: T, ...strip: U): StripTrailing<T, TupleToUnion<U>>;
9
9
  //# sourceMappingURL=stripTrailing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripTrailing.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripTrailing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,0BAAwB;AAQhD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,MAAM,GAAG,MAAM,EAEzB,OAAO,EAAE,CAAC,EACV,KAAK,EAAE,CAAC,GACP,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAOrB"}
1
+ {"version":3,"file":"stripTrailing.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripTrailing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,0BAAwB;AAG9D;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAEtC,OAAO,EAAE,CAAC,EACV,GAAG,KAAK,EAAE,CAAC,GACV,aAAa,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAYnC"}
@@ -1,17 +1,16 @@
1
- const switchType = (content) => (val) => {
2
- return typeof content === "number"
3
- ? Number(val)
4
- : val;
5
- };
1
+ import { isNumber } from "../type-guards/index.js";
6
2
  /**
7
3
  * **stripTrailing**(content, strip)
8
4
  *
9
5
  * Runtime utility which ensures that last part of a string has substring
10
6
  * removed if it exists and that strong typing is preserved.
11
7
  */
12
- export function stripTrailing(content, strip) {
13
- const re = new RegExp(`(.*)${strip}$`);
14
- return (String(content)?.endsWith(String(strip))
15
- ? switchType(content)(String(content).replace(re, "$1"))
16
- : switchType(content)(String(content)));
8
+ export function stripTrailing(content, ...strip) {
9
+ let output = String(content);
10
+ for (const s of strip) {
11
+ if (output.endsWith(String(s))) {
12
+ output = output.slice(0, -1 * String(s).length);
13
+ }
14
+ }
15
+ return (isNumber(content) ? Number(output) : output);
17
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stripUntil.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAC,UAAU,EAAE,0BAAwB;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,uEAGZ,QAAQ,YAAY,MAAM,+CAKpC,CAAA"}
1
+ {"version":3,"file":"stripUntil.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAC,UAAU,EAAE,0BAAwB;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,SAAS,MAAM,EAAE,WACvB,QAAQ,YAAY,MAAM,KAIS,UAAU,CAAC,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CACtF,CAAA"}
@@ -1,9 +1,9 @@
1
- import { RetainWhile } from "../../types/string-literals";
1
+ import { NumericChar, RetainWhile } from "../../types/string-literals";
2
2
  /**
3
3
  * **takeNumericCharacters**`(content)`
4
4
  *
5
5
  * Starts at the passed in content and extracts all numeric characters
6
6
  * in the string until a non-numeric value arrives.
7
7
  */
8
- export declare const takeNumericCharacters: <T extends string>(content: T) => RetainWhile<T, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
8
+ export declare const takeNumericCharacters: <T extends string>(content: T) => RetainWhile<T, NumericChar>;
9
9
  //# sourceMappingURL=takeNumericCharacters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"takeNumericCharacters.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/takeNumericCharacters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,WAAW,EAAE,oCAAkC;AAGrE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,8BAA+B,CAAC,8EAIjE,CAAA"}
1
+ {"version":3,"file":"takeNumericCharacters.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/takeNumericCharacters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,oCAAkC;AAGrE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,WAAW,CAAC,KAGZ,WAAW,CAAC,CAAC,EAAE,WAAW,CAC/E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toKebabCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,0BAAwB;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,KAAK,EACzB,KAAK,EAAE,CAAC,EAAE,mBAAmB,CAAC,EAAE,CAAC,mBAelC"}
1
+ {"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toKebabCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,0BAAwB;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,KAAK,EACzB,KAAK,EAAE,CAAC,EAAE,mBAAmB,CAAC,EAAE,CAAC,GAcF,SAAS,CAAC,CAAC,EAAC,CAAC,CAAC,CAC9C"}
@@ -1,3 +1,3 @@
1
- import { ToNumericArray } from "../../types/index";
2
- export declare const toNumericArray: <T extends readonly unknown[]>(arr: T) => ToNumericArray<T>;
1
+ import { ToNumericArray, Tuple } from "../../types/index";
2
+ export declare const toNumericArray: <T extends Tuple>(arr: T) => ToNumericArray<T>;
3
3
  //# sourceMappingURL=toNumericArray.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toNumericArray.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toNumericArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAS,0BAAwB;AAExD,eAAO,MAAM,cAAc,sCAA0B,CAAC,sBAErD,CAAC"}
1
+ {"version":3,"file":"toNumericArray.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toNumericArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,0BAAwB;AAExD,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,KAAK,OAAO,CAAC,KACP,cAAc,CAAC,CAAC,CAC9D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"toPascalCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toPascalCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,0BAAwB;AAI9E;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACzC,KAAK,EAAE,CAAC,EAAE,kBAAkB,GAAE,CAAkB,gGAoBjD"}
1
+ {"version":3,"file":"toPascalCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toPascalCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,0BAAwB;AAI9E;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACzC,KAAK,EAAE,CAAC,EAAE,kBAAkB,GAAE,CAAkB,GAiB/B,IAAI,SAAS,CAAC,GAC3B,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,GAC3D,UAAU,CAAC,CAAC,CAAC,CAClB"}
@@ -1,3 +1,3 @@
1
1
  import { Truncate } from "../../types/index";
2
- export declare const truncate: <TStr extends string, TMax extends number, TEllipsis extends string | boolean = false>(content: TStr, maxLength: TMax, ellipsis?: TEllipsis) => Truncate<TStr, TMax, TEllipsis>;
2
+ export declare const truncate: <TStr extends string, TMax extends number, TEllipsis extends boolean | string = false>(content: TStr, maxLength: TMax, ellipsis?: TEllipsis) => Truncate<TStr, TMax, TEllipsis>;
3
3
  //# sourceMappingURL=truncate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/truncate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,0BAAwB;AAI3C,eAAO,MAAM,QAAQ,kGAIV,IAAI,aAAa,IAAI,aAAY,SAAS,oCAWpD,CAAA"}
1
+ {"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/truncate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,0BAAwB;AAI3C,eAAO,MAAM,QAAQ,GACnB,IAAI,SAAS,MAAM,EACnB,IAAI,SAAS,MAAM,EACnB,SAAS,SAAS,OAAO,GAAG,MAAM,mBACzB,IAAI,aAAa,IAAI,aAAY,SAAS,KAS9C,QAAQ,CAAC,IAAI,EAAC,IAAI,EAAC,SAAS,CAElC,CAAA"}
@@ -9,5 +9,5 @@ import { First, If, IsUnion, Length, Narrowable, UnionToTuple } from "../../type
9
9
  * const t2 = tuple([1,2,3]);
10
10
  * ```
11
11
  */
12
- export declare const tuple: <N extends Narrowable, K extends PropertyKey, T extends readonly (Narrowable | Record<K, N>)[]>(...values: T) => import("../../types/index").AsArray<Length<T> extends 1 ? T[0] extends readonly unknown[] ? T[0] extends infer Arr ? If<IsUnion<First<Arr & readonly unknown[]>>, UnionToTuple<First<T[0]>>, T[0]> : T[0] : T[0] : T>;
12
+ export declare const tuple: <N extends Narrowable, K extends PropertyKey, T extends readonly (Record<K, N> | Narrowable)[]>(...values: T) => import("../../types/index").AsArray<Length<T> extends 1 ? T[0] extends readonly unknown[] ? T[0] extends infer Arr ? If<IsUnion<First<Arr & readonly unknown[]>>, UnionToTuple<First<T[0]>>, T[0]> : T[0] : T[0] : T>;
13
13
  //# sourceMappingURL=tuple.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,0BAAwB;AAGvF;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,6GAIL,CAAC,0NAmBb,CAAC"}
1
+ {"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,0BAAwB;AAGvF;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAChB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,aACrC,CAAC,oHAOW,GAAG,mGAY3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"urlMeta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/urlMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,UAAU,EACV,iBAAiB,EAEjB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACb,0BAAwB;AAiBzB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,wBAAwB;IACxB,GAAG,EAAE,CAAC,CAAC;IACP,oFAAoF;IACpF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,4CAA4C;IAC5C,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,SAAS,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC/C,WAAW,EAAE,CAAC,SAAS,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC7D,gEAAgE;IAChE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAGpB,+CAA+C;IAC/C,MAAM,EAAE,CAAC,SAAS,MAAM,GACpB,YAAY,CAAC,CAAC,CAAC,GACf,KAAK,CAAC;IACV;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5B;;OAEG;IACH,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAE/B;;OAEG;IACH,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CAChC,CAAA;AAKD,eAAO,MAAM,cAAc,0BAGpB,CAAC,sBAKP,CAAA;AAED,eAAO,MAAM,iBAAiB,0BAA2B,CAAC,sDAEzD,CAAA;AAMD,eAAO,MAAM,UAAU,0BAGhB,CAAC,kBAOP,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,wDAIvB,CAAC,aACI,CAAC,iDAqBZ,CAAA;AAED,eAAO,MAAM,UAAU,0BAGhB,CAAC,uBAUP,CAAA;AAED,eAAO,MAAM,YAAY,0BAGlB,CAAC,oBASP,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,OAAO,0BAEb,CAAC;;;;;;;;;;;CAcP,CAAA"}
1
+ {"version":3,"file":"urlMeta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/urlMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,UAAU,EACV,iBAAiB,EAEjB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACb,0BAAwB;AAiBzB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,wBAAwB;IACxB,GAAG,EAAE,CAAC,CAAC;IACP,oFAAoF;IACpF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,4CAA4C;IAC5C,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,SAAS,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC/C,WAAW,EAAE,CAAC,SAAS,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC7D,gEAAgE;IAChE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAGpB,+CAA+C;IAC/C,MAAM,EAAE,CAAC,SAAS,MAAM,GACpB,YAAY,CAAC,CAAC,CAAC,GACf,KAAK,CAAC;IACV;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5B;;OAEG;IACH,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAE/B;;OAEG;IACH,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CAChC,CAAA;AAKD,eAAO,MAAM,cAAc,GACzB,CAAC,SAAS,MAAM,OAEX,CAAC,KAIU,cAAc,CAAC,CAAC,CACjC,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,OAAO,CAAC,sDAEzD,CAAA;AAUD,eAAO,MAAM,UAAU,GACrB,CAAC,SAAS,MAAM,OAEX,CAAC,kBAOP,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,GAAG,SAAS,OAEvB,CAAC,aACI,CAAC,iDAqBZ,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,CAAC,SAAS,MAAM,OAEX,CAAC,uBAUP,CAAA;AAED,eAAO,MAAM,YAAY,GACvB,CAAC,SAAS,MAAM,OAEX,CAAC,KAQU,YAAY,CAAC,CAAC,CAC/B,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAClB,CAAC,SAAS,MAAM,OACX,CAAC;;WAGiB,KAAK,CAAC,CAAC,CAAC;cACI,cAAc,CAAC,CAAC,CAAC;UACzB,UAAU,CAAC,CAAC,CAAC;;UAEb,UAAU,CAAC,CAAC,CAAC;YACT,YAAY,CAAC,CAAC,CAAC;iBACG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;kBAC1B,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;kBAC7B,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAGjF,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { isUrl, isIp4Address, isIp6Address, isIpAddress, stripAfter, stripBefore, ensureLeading, stripTrailing, isDomainName, takeNumericCharacters, } from "../index.js";
2
2
  import { NETWORK_PROTOCOL_LOOKUP } from "../../constants/NetworkConstants.js";
3
- import { Never } from "../../constants/Never.js";
3
+ import { Never } from "../../constants/index.js";
4
4
  const PROTOCOLS = Object.values(NETWORK_PROTOCOL_LOOKUP).flat().filter(i => i !== "");
5
5
  export const getUrlProtocol = (url) => {
6
6
  const proto = PROTOCOLS.find(p => url.startsWith(`${p}://`));
@@ -9,9 +9,12 @@ export const getUrlProtocol = (url) => {
9
9
  export const removeUrlProtocol = (url) => {
10
10
  return stripBefore(url, "://");
11
11
  };
12
- const ensurePath = (val) => val === ""
13
- ? ""
14
- : stripTrailing(ensureLeading(val, "/"), "/");
12
+ const ensurePath = (val) => {
13
+ const val2 = ensureLeading(val, "/");
14
+ return val === ""
15
+ ? ""
16
+ : stripTrailing(val2, "/");
17
+ };
15
18
  export const getUrlPath = (url) => {
16
19
  return isUrl(url)
17
20
  ? ensurePath(stripAfter(stripBefore(removeUrlProtocol(url), "/"), "?"))
@@ -30,7 +33,7 @@ export const getUrlQueryParams = (url, specific = undefined) => {
30
33
  const qp = stripBefore(url, "?");
31
34
  if (specific) {
32
35
  return (qp.includes(`${specific}=`)
33
- ? decodeURIComponent(stripAfter(stripBefore(qp, (`${specific}=`)), "&").replace(/\+/g, '%20'))
36
+ ? decodeURIComponent(stripAfter(stripBefore(qp, (`${specific}=`)), "&").replace(/\+/g, "%20"))
34
37
  : undefined);
35
38
  }
36
39
  return (qp === ""
@@ -1 +1 @@
1
- {"version":3,"file":"youtube-meta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/youtube-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,EACV,eAAe,EAChB,0BAAwB;AAgBzB;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI;IAC1C;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC;IACP;;;OAGG;IACH,YAAY,EAAE,CAAC,SAAS,UAAU,GAAG,IAAI,GAAG,KAAK,CAAC;IAElD;;;SAGK;IACL,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,IAAI,GAAG,KAAK,CAAC;IAErD,QAAQ,EAAE,EAAE,CACV,kBAAkB,CAAC,CAAC,CAAC,EACrB,eAAe,CAChB,CAAA;CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,0BAA2B,CAAC,0BAyC1D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,QAAS,eAAe,oBAchD,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,0BAA2B,CAAC,KAAG,YAAY,CAAC,CAcnE,CAAA"}
1
+ {"version":3,"file":"youtube-meta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/youtube-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,EACV,eAAe,EAChB,0BAAwB;AAgBzB;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI;IAC1C;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC;IACP;;;OAGG;IACH,YAAY,EAAE,CAAC,SAAS,UAAU,GAAG,IAAI,GAAG,KAAK,CAAC;IAElD;;;SAGK;IACL,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,IAAI,GAAG,KAAK,CAAC;IAErD,QAAQ,EAAE,EAAE,CACV,kBAAkB,CAAC,CAAC,CAAC,EACrB,eAAe,CAChB,CAAA;CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,MAAM,OAAO,CAAC,KAwCzC,kBAAkB,CAAC,CAAC,CACrC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,QAAS,eAAe,oBAchD,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,OAAO,CAAC,KAAG,WAAW,CAAC,CAAC,CAcnE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { FifoQueue, Narrowable } from "../../types/index";
2
+ export declare const createFifoQueue: <T extends readonly K[], K extends Narrowable>(...list: T) => FifoQueue<T[number]>;
3
+ //# sourceMappingURL=fifo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fifo.d.ts","sourceRoot":"","sources":["../../../src/runtime/queues/fifo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,UAAU,EAAE,0BAAwB;AA4C1E,eAAO,MAAM,eAAe,GAC1B,CAAC,SAAS,SAAS,CAAC,EAAE,EACtB,CAAC,SAAS,UAAU,WACX,CAAC,yBAGX,CAAA"}
@@ -0,0 +1,40 @@
1
+ const queue = (state) => ({
2
+ queue: state,
3
+ size: state.length,
4
+ isEmpty() {
5
+ return state.length === 0;
6
+ },
7
+ clear() {
8
+ state.slice(0, 0);
9
+ },
10
+ drain() {
11
+ const old_state = [...state];
12
+ state.slice(0, 0);
13
+ return old_state;
14
+ },
15
+ push(...add) {
16
+ state.push(...add);
17
+ },
18
+ drop(quantity) {
19
+ if (quantity && quantity > state.length) {
20
+ throw new Error('Cannot drop more elements than present in the queue');
21
+ }
22
+ state.splice(0, quantity || 1);
23
+ },
24
+ take(quantity) {
25
+ if (quantity && quantity > state.length) {
26
+ throw new Error('Cannot take more elements than present in the queue');
27
+ }
28
+ const result = state.slice(0, quantity || 1);
29
+ state.splice(0, quantity || 1);
30
+ return result;
31
+ },
32
+ [Symbol.iterator]: function* () {
33
+ for (let i = 0; i < state.length; i++) {
34
+ yield state[i];
35
+ }
36
+ }
37
+ });
38
+ export const createFifoQueue = (...list) => {
39
+ return queue([...list]);
40
+ };