@zthun/helpful-web 9.11.5 → 9.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/hierarchy.js +1 -1
- package/dist/assets/navigation.js +1 -1
- package/dist/assets/search.js +1 -1
- package/dist/classes/_zthun_helpful-brands.ZBrandBuilder.html +9 -9
- package/dist/classes/_zthun_helpful-brands.ZBrandDataSourceFactory.html +2 -2
- package/dist/classes/_zthun_helpful-brands.ZBrandKnown.html +37 -37
- package/dist/classes/_zthun_helpful-brands.ZBrandMetadata.html +2 -2
- package/dist/classes/_zthun_helpful-fn.ZAssert.html +4 -4
- package/dist/classes/_zthun_helpful-fn.ZDeserializeJson.html +3 -3
- package/dist/classes/_zthun_helpful-fn.ZDeserializeTry.html +3 -3
- package/dist/classes/_zthun_helpful-fn.ZLazy.html +2 -2
- package/dist/classes/_zthun_helpful-fn.ZQuadrilateralBuilder.html +11 -11
- package/dist/classes/_zthun_helpful-fn.ZQuadrilateralCornersBuilder.html +13 -13
- package/dist/classes/_zthun_helpful-fn.ZRectangle.html +18 -18
- package/dist/classes/_zthun_helpful-fn.ZSerializeJson.html +2 -2
- package/dist/classes/_zthun_helpful-internet.ZCookieBuilder.html +16 -16
- package/dist/classes/_zthun_helpful-internet.ZEmailBuilder.html +8 -8
- package/dist/classes/_zthun_helpful-internet.ZEmailContactAddressBuilder.html +5 -5
- package/dist/classes/_zthun_helpful-internet.ZEmailContactBuilder.html +8 -8
- package/dist/classes/_zthun_helpful-internet.ZEmailEnvelopeBuilder.html +12 -12
- package/dist/classes/_zthun_helpful-internet.ZServerBuilder.html +9 -9
- package/dist/classes/_zthun_helpful-query.ZAggregateBuilder.html +5 -5
- package/dist/classes/_zthun_helpful-query.ZDataFilterFields.html +2 -2
- package/dist/classes/_zthun_helpful-query.ZDataMatchAlways.html +2 -2
- package/dist/classes/_zthun_helpful-query.ZDataMatchOptional.html +3 -3
- package/dist/classes/_zthun_helpful-query.ZDataRequestBuilder.html +10 -10
- package/dist/classes/_zthun_helpful-query.ZDataSearchFields.html +3 -3
- package/dist/classes/_zthun_helpful-query.ZDataSearchText.html +2 -2
- package/dist/classes/_zthun_helpful-query.ZDataSourceStatic.html +9 -9
- package/dist/classes/_zthun_helpful-query.ZDataSourceStaticOptionsBuilder.html +6 -6
- package/dist/classes/_zthun_helpful-query.ZFilterBinaryBuilder.html +16 -16
- package/dist/classes/_zthun_helpful-query.ZFilterCollectionBuilder.html +10 -10
- package/dist/classes/_zthun_helpful-query.ZFilterDeserialize.html +2 -2
- package/dist/classes/_zthun_helpful-query.ZFilterLogicBuilder.html +9 -9
- package/dist/classes/_zthun_helpful-query.ZFilterSerialize.html +2 -2
- package/dist/classes/_zthun_helpful-query.ZFilterUnaryBuilder.html +8 -8
- package/dist/classes/_zthun_helpful-query.ZMetadataBuilder.html +26 -26
- package/dist/classes/_zthun_helpful-query.ZPageBuilder.html +9 -9
- package/dist/classes/_zthun_helpful-query.ZSortBuilder.html +7 -7
- package/dist/classes/_zthun_helpful-query.ZSortDeserialize.html +2 -2
- package/dist/classes/_zthun_helpful-query.ZSortSerialize.html +2 -2
- package/dist/classes/_zthun_helpful-query.ZSorterSingle.html +5 -5
- package/dist/classes/_zthun_helpful-react.ZFileSelect.html +3 -3
- package/dist/classes/_zthun_helpful-validation.EqualsOtherPropertyValidator.html +2 -2
- package/dist/classes/_zthun_helpful-validation.IsDataURILimitValidator.html +2 -2
- package/dist/classes/_zthun_helpful-validation.IsNotWhiteSpaceValidator.html +2 -2
- package/dist/classes/_zthun_helpful-validation.RequiresOtherPropertyValidator.html +2 -2
- package/dist/enums/_zthun_helpful-fn.ZDateFormats.html +17 -0
- package/dist/enums/_zthun_helpful-fn.ZHorizontalAnchor.html +4 -4
- package/dist/enums/_zthun_helpful-fn.ZOrientation.html +3 -3
- package/dist/enums/_zthun_helpful-fn.ZVerticalAnchor.html +4 -4
- package/dist/enums/_zthun_helpful-query.ZMetadataType.html +9 -9
- package/dist/enums/_zthun_helpful-query.ZOperatorBinary.html +10 -10
- package/dist/enums/_zthun_helpful-query.ZOperatorCollection.html +3 -3
- package/dist/enums/_zthun_helpful-query.ZOperatorLogic.html +3 -3
- package/dist/enums/_zthun_helpful-query.ZOperatorUnary.html +3 -3
- package/dist/enums/_zthun_helpful-query.ZSortDirection.html +3 -3
- package/dist/enums/_zthun_helpful-query.ZWellKnownIconClasses.html +5 -5
- package/dist/functions/_zthun_helpful-fn.castEnum.html +20 -0
- package/dist/functions/_zthun_helpful-fn.castExtension.html +1 -1
- package/dist/functions/_zthun_helpful-fn.castNumber.html +26 -0
- package/dist/functions/_zthun_helpful-fn.countBuckets.html +1 -1
- package/dist/functions/_zthun_helpful-fn.createError.html +1 -1
- package/dist/functions/_zthun_helpful-fn.culture.html +3 -0
- package/dist/functions/_zthun_helpful-fn.cultures.html +3 -0
- package/dist/functions/_zthun_helpful-fn.detokenize.html +1 -1
- package/dist/functions/_zthun_helpful-fn.firstDefined.html +1 -1
- package/dist/functions/_zthun_helpful-fn.firstTruthy.html +1 -1
- package/dist/functions/_zthun_helpful-fn.firstWhere.html +1 -1
- package/dist/functions/_zthun_helpful-fn.formatDateTime.html +9 -0
- package/dist/functions/_zthun_helpful-fn.guessDateTime.html +5 -0
- package/dist/functions/_zthun_helpful-fn.isEmptyObject.html +1 -1
- package/dist/functions/_zthun_helpful-fn.isEnum.html +7 -0
- package/dist/functions/_zthun_helpful-fn.joinDefined.html +1 -1
- package/dist/functions/_zthun_helpful-fn.optional.html +2 -2
- package/dist/functions/_zthun_helpful-fn.parseDateTime.html +12 -0
- package/dist/functions/_zthun_helpful-fn.peel.html +1 -1
- package/dist/functions/_zthun_helpful-fn.peelBetween.html +1 -1
- package/dist/functions/_zthun_helpful-fn.pickBy.html +1 -1
- package/dist/functions/_zthun_helpful-fn.pickDataAttributes.html +1 -1
- package/dist/functions/_zthun_helpful-fn.pickDefined.html +1 -1
- package/dist/functions/_zthun_helpful-fn.pickEvents.html +1 -1
- package/dist/functions/_zthun_helpful-fn.purge.html +1 -1
- package/dist/functions/_zthun_helpful-fn.required.html +1 -1
- package/dist/functions/_zthun_helpful-fn.setFirst.html +1 -1
- package/dist/functions/_zthun_helpful-fn.sleep.html +2 -2
- package/dist/functions/_zthun_helpful-fn.tag.html +1 -1
- package/dist/functions/_zthun_helpful-fn.timeZones.html +3 -0
- package/dist/functions/_zthun_helpful-fn.tryFallback.html +2 -2
- package/dist/functions/_zthun_helpful-fn.tryFallbackAsync.html +2 -2
- package/dist/functions/_zthun_helpful-fn.tryJsonParse.html +2 -2
- package/dist/functions/_zthun_helpful-fn.userTimeZone.html +3 -0
- package/dist/functions/_zthun_helpful-query.isBinaryFilter.html +1 -1
- package/dist/functions/_zthun_helpful-query.isBinaryOperator.html +1 -1
- package/dist/functions/_zthun_helpful-query.isCollectionFilter.html +1 -1
- package/dist/functions/_zthun_helpful-query.isCollectionOperator.html +1 -1
- package/dist/functions/_zthun_helpful-query.isLogicFilter.html +1 -1
- package/dist/functions/_zthun_helpful-query.isLogicOperator.html +1 -1
- package/dist/functions/_zthun_helpful-query.isUnaryFilter.html +1 -1
- package/dist/functions/_zthun_helpful-query.isUnaryOperator.html +1 -1
- package/dist/functions/_zthun_helpful-react.asStateData.html +2 -2
- package/dist/functions/_zthun_helpful-react.asStateError.html +1 -1
- package/dist/functions/_zthun_helpful-react.createKeyboardActivate.html +1 -1
- package/dist/functions/_zthun_helpful-react.isStateErrored.html +1 -1
- package/dist/functions/_zthun_helpful-react.isStateLoaded.html +1 -1
- package/dist/functions/_zthun_helpful-react.isStateLoading.html +1 -1
- package/dist/functions/_zthun_helpful-react.useAmbassadorState.html +2 -2
- package/dist/functions/_zthun_helpful-react.useAsyncState.html +1 -1
- package/dist/functions/_zthun_helpful-react.useFileSelect.html +1 -1
- package/dist/functions/_zthun_helpful-react.useKeyboardActivate.html +1 -1
- package/dist/functions/_zthun_helpful-react.useMoreViewState.html +1 -1
- package/dist/functions/_zthun_helpful-react.usePageViewState.html +1 -1
- package/dist/functions/_zthun_helpful-react.useStateAsArray.html +1 -1
- package/dist/functions/_zthun_helpful-react.useSyncState.html +1 -1
- package/dist/functions/_zthun_helpful-react.useWindowService.html +1 -1
- package/dist/functions/_zthun_helpful-reflection.ZTag.html +1 -1
- package/dist/functions/_zthun_helpful-reflection.isTagged.html +1 -1
- package/dist/functions/_zthun_helpful-validation.EqualsOtherProperty.html +1 -1
- package/dist/functions/_zthun_helpful-validation.IsDataURILimit.html +1 -1
- package/dist/functions/_zthun_helpful-validation.IsNotWhiteSpace.html +1 -1
- package/dist/functions/_zthun_helpful-validation.RequiresOtherProperty.html +1 -1
- package/dist/hierarchy.html +1 -1
- package/dist/interfaces/_zthun_helpful-brands.IZBrand.html +6 -6
- package/dist/interfaces/_zthun_helpful-fn.IZDeserialize.html +2 -2
- package/dist/interfaces/_zthun_helpful-fn.IZPoint2d.html +3 -3
- package/dist/interfaces/_zthun_helpful-fn.IZPoint3d.html +4 -4
- package/dist/interfaces/_zthun_helpful-fn.IZQuadrilateral.html +5 -5
- package/dist/interfaces/_zthun_helpful-fn.IZQuadrilateralCorners.html +2 -2
- package/dist/interfaces/_zthun_helpful-fn.IZSerialize.html +2 -2
- package/dist/interfaces/_zthun_helpful-internet.IZCookie.html +8 -8
- package/dist/interfaces/_zthun_helpful-internet.IZEmail.html +4 -4
- package/dist/interfaces/_zthun_helpful-internet.IZEmailContact.html +4 -4
- package/dist/interfaces/_zthun_helpful-internet.IZEmailEnvelope.html +5 -5
- package/dist/interfaces/_zthun_helpful-internet.IZServer.html +5 -5
- package/dist/interfaces/_zthun_helpful-query.IZAggregate.html +3 -3
- package/dist/interfaces/_zthun_helpful-query.IZDataMatch.html +2 -2
- package/dist/interfaces/_zthun_helpful-query.IZDataRequest.html +6 -6
- package/dist/interfaces/_zthun_helpful-query.IZDataRequestQuery.html +6 -6
- package/dist/interfaces/_zthun_helpful-query.IZDataSource.html +3 -3
- package/dist/interfaces/_zthun_helpful-query.IZDataSourceStaticOptions.html +4 -4
- package/dist/interfaces/_zthun_helpful-query.IZFilterBinary.html +5 -5
- package/dist/interfaces/_zthun_helpful-query.IZFilterCollection.html +5 -5
- package/dist/interfaces/_zthun_helpful-query.IZFilterLogic.html +4 -4
- package/dist/interfaces/_zthun_helpful-query.IZFilterMetadata.html +2 -2
- package/dist/interfaces/_zthun_helpful-query.IZFilterOperator.html +3 -3
- package/dist/interfaces/_zthun_helpful-query.IZFilterSubject.html +4 -4
- package/dist/interfaces/_zthun_helpful-query.IZMetadata.html +14 -14
- package/dist/interfaces/_zthun_helpful-query.IZPage.html +3 -3
- package/dist/interfaces/_zthun_helpful-query.IZSort.html +3 -3
- package/dist/interfaces/_zthun_helpful-query.IZSorter.html +4 -4
- package/dist/interfaces/_zthun_helpful-react.IZFileSelect.html +2 -2
- package/dist/interfaces/_zthun_helpful-react.IZKeyboardInteraction.html +3 -3
- package/dist/modules/_zthun_helpful-fn.html +1 -1
- package/dist/types/_zthun_helpful-fn.DeepPartial.html +1 -1
- package/dist/types/_zthun_helpful-fn.JoinListInputParameter.html +1 -1
- package/dist/types/_zthun_helpful-fn.PickPredicate.html +1 -1
- package/dist/types/_zthun_helpful-fn.PickResult.html +1 -1
- package/dist/types/_zthun_helpful-fn.RequiredDeep.html +1 -1
- package/dist/types/_zthun_helpful-fn.RequiredPick.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZAnchor.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZCornersHorizontal.html +2 -2
- package/dist/types/_zthun_helpful-fn.ZCornersVertical.html +2 -2
- package/dist/types/_zthun_helpful-fn.ZDateTime.html +2 -0
- package/dist/types/_zthun_helpful-fn.ZDateTimeOptions.html +18 -0
- package/dist/types/_zthun_helpful-fn.ZDeepPartial.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZMutable.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZMutableKeys.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZNullable.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZNumberLike.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZObligatedValue.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZOptional.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZQuadrilateralCornersLike.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZQuadrilateralLike.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZRequiredDeep.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZRequiredPick.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZSideAnchor.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZSupplier.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZSupplierAsync.html +1 -1
- package/dist/types/_zthun_helpful-query.IZFilter.html +1 -1
- package/dist/types/_zthun_helpful-query.IZFilterUnary.html +1 -1
- package/dist/types/_zthun_helpful-query.ZOperatorFilter.html +1 -1
- package/dist/types/_zthun_helpful-react.ZAmbassadorReducer.html +1 -1
- package/dist/types/_zthun_helpful-react.ZAmbassadorReducerRequired.html +1 -1
- package/dist/types/_zthun_helpful-react.ZAmbassadorSetCurrent.html +1 -1
- package/dist/types/_zthun_helpful-react.ZAsyncDataState.html +1 -1
- package/dist/types/_zthun_helpful-react.ZAsyncDataTuple.html +1 -1
- package/dist/types/_zthun_helpful-react.ZAsyncUseData.html +1 -1
- package/dist/types/_zthun_helpful-react.ZSetStateAsArray.html +1 -1
- package/dist/types/_zthun_helpful-react.ZStateAsArrayReducer.html +1 -1
- package/dist/variables/_zthun_helpful-fn._global.html +1 -1
- package/dist/variables/_zthun_helpful-fn.bash.html +1 -1
- package/dist/variables/_zthun_helpful-fn.commaJoinDefined.html +1 -1
- package/dist/variables/_zthun_helpful-fn.createGuid.html +1 -1
- package/dist/variables/_zthun_helpful-fn.css.html +1 -1
- package/dist/variables/_zthun_helpful-fn.cssJoinDefined.html +1 -1
- package/dist/variables/_zthun_helpful-fn.gib.html +1 -1
- package/dist/variables/_zthun_helpful-fn.gibibytes.html +1 -1
- package/dist/variables/_zthun_helpful-fn.html.html +1 -1
- package/dist/variables/_zthun_helpful-fn.javascript.html +1 -1
- package/dist/variables/_zthun_helpful-fn.js.html +1 -1
- package/dist/variables/_zthun_helpful-fn.kib.html +1 -1
- package/dist/variables/_zthun_helpful-fn.kibibytes.html +1 -1
- package/dist/variables/_zthun_helpful-fn.markdown.html +1 -1
- package/dist/variables/_zthun_helpful-fn.md.html +1 -1
- package/dist/variables/_zthun_helpful-fn.mebibytes.html +1 -1
- package/dist/variables/_zthun_helpful-fn.mib.html +1 -1
- package/dist/variables/_zthun_helpful-fn.pebibytes.html +1 -1
- package/dist/variables/_zthun_helpful-fn.pib.html +1 -1
- package/dist/variables/_zthun_helpful-fn.pipeJoinDefined.html +1 -1
- package/dist/variables/_zthun_helpful-fn.semiColonJoinDefined.html +1 -1
- package/dist/variables/_zthun_helpful-fn.sh.html +1 -1
- package/dist/variables/_zthun_helpful-fn.spaceJoinDefined.html +1 -1
- package/dist/variables/_zthun_helpful-fn.tebibytes.html +1 -1
- package/dist/variables/_zthun_helpful-fn.tib.html +1 -1
- package/dist/variables/_zthun_helpful-fn.ts.html +1 -1
- package/dist/variables/_zthun_helpful-fn.typescript.html +1 -1
- package/dist/variables/_zthun_helpful-fn.zsh.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZBinaryComparators.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZCollectionComparators.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZOperatorsBinary.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZOperatorsCollection.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZOperatorsFilter.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZOperatorsLogic.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZOperatorsUnary.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZSortDirections.html +1 -1
- package/dist/variables/_zthun_helpful-query.ZUnaryComparators.html +1 -1
- package/dist/variables/_zthun_helpful-react.DefaultActivateCodes.html +1 -1
- package/dist/variables/_zthun_helpful-react.ZAsyncLoading.html +1 -1
- package/dist/variables/_zthun_helpful-react.ZFileSelectContext.html +1 -1
- package/dist/variables/_zthun_helpful-react.ZWindowServiceContext.html +1 -1
- package/package.json +7 -7
|
@@ -11,4 +11,4 @@ named, message, error, exception, and data, in that order.</p>
|
|
|
11
11
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">// All of these result an Error with the message, 'Something went wrong'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">errorWithStringProblem</span><span class="hl-2"> = </span><span class="hl-1">createError</span><span class="hl-2">(</span><span class="hl-3">'Something went wrong'</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">errorWithObjectProblemInSchema</span><span class="hl-2"> = </span><span class="hl-1">createError</span><span class="hl-2">({ </span><span class="hl-6">error:</span><span class="hl-2"> </span><span class="hl-3">'Something went wrong'</span><span class="hl-2">});</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">errorWithCustomSchema</span><span class="hl-2"> = </span><span class="hl-1">createError</span><span class="hl-2">({ </span><span class="hl-6">issue:</span><span class="hl-2"> </span><span class="hl-3">'Something went wrong'</span><span class="hl-2">}, [</span><span class="hl-3">'issue'</span><span class="hl-2">]);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">errorRecursive</span><span class="hl-2"> = </span><span class="hl-1">createError</span><span class="hl-2">({ </span><span class="hl-6">error:</span><span class="hl-2"> { </span><span class="hl-6">message:</span><span class="hl-2"> </span><span class="hl-3">'Something went wrong'</span><span class="hl-2"> }});</span><br/><br/><span class="hl-0">// This would result in '[Object object]' as there is no way to figure out how to deconstruct this problem.</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">errorCannotBeFound</span><span class="hl-2"> = </span><span class="hl-1">createError</span><span class="hl-2">({ </span><span class="hl-6">wut:</span><span class="hl-2"> </span><span class="hl-3">'Something went wrong'</span><span class="hl-2"> });</span>
|
|
12
12
|
</code><button type="button">Copy</button></pre>
|
|
13
13
|
|
|
14
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
14
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/create-error/create-error.mts#L31">create-error/create-error.mts:31</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>culture | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-fn.html">@zthun/helpful-fn</a></li><li><a href="" aria-current="page">culture</a></li></ul><h1>Function culture</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="culture"><span class="tsd-kind-call-signature">culture</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#culture" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the users current culture (locale).</p>
|
|
2
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>The current locale.</p>
|
|
3
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/culture/culture.mts#L9">culture/culture.mts:9</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>cultures | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-fn.html">@zthun/helpful-fn</a></li><li><a href="" aria-current="page">cultures</a></li></ul><h1>Function cultures</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="cultures"><span class="tsd-kind-call-signature">cultures</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#cultures" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all supported cultures.</p>
|
|
2
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>A list of currently supported culture codes.</p>
|
|
3
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/culture/culture.mts#L20">culture/culture.mts:20</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -6,4 +6,4 @@ in the token dictionary. If a value is missing in the token dictionary,
|
|
|
6
6
|
then the tokens are preserved. If the value of a token is null or
|
|
7
7
|
undefined explicitly, then any tokens in the tokenized string are
|
|
8
8
|
removed for that value.</p>
|
|
9
|
-
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
9
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/detokenize/detokenize.mts#L18">detokenize/detokenize.mts:18</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -9,4 +9,4 @@ remaining are null or undefined, then fallback is returned.</p>
|
|
|
9
9
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">// 'Defined'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldBeDefined</span><span class="hl-2"> = </span><span class="hl-1">firstDefined</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-4">null</span><span class="hl-2">, </span><span class="hl-4">undefined</span><span class="hl-2">, </span><span class="hl-3">'Defined'</span><span class="hl-2">);</span><br/><span class="hl-0">// 'Fallback'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldBeFallback</span><span class="hl-2"> = </span><span class="hl-1">firstDefined</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-4">null</span><span class="hl-2">, </span><span class="hl-4">undefined</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldAlsoBeFallback</span><span class="hl-2"> = </span><span class="hl-1">firstDefined</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-4">undefined</span><span class="hl-2">);</span><br/><span class="hl-0">// 'First'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldBeFirst</span><span class="hl-2"> = </span><span class="hl-1">firstDefined</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-3">'First'</span><span class="hl-2">, </span><span class="hl-4">null</span><span class="hl-2">, </span><span class="hl-3">'Third'</span><span class="hl-2">);</span>
|
|
10
10
|
</code><button type="button">Copy</button></pre>
|
|
11
11
|
|
|
12
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
12
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/first-where/first-where.mts#L70">first-where/first-where.mts:70</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -9,4 +9,4 @@ all values of remaining are falsy, then fallback is returned.</p>
|
|
|
9
9
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">// 'Defined'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldBeDefined</span><span class="hl-2"> = </span><span class="hl-1">firstTruthy</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-4">null</span><span class="hl-2">, </span><span class="hl-4">undefined</span><span class="hl-2">, </span><span class="hl-3">'Defined'</span><span class="hl-2">);</span><br/><span class="hl-0">// 'Fallback'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldBeFallback</span><span class="hl-2"> = </span><span class="hl-1">firstTruthy</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-3">''</span><span class="hl-2">, </span><span class="hl-4">undefined</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldAlsoBeFallback</span><span class="hl-2"> = </span><span class="hl-1">firstDefined</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-9">0</span><span class="hl-2">, </span><span class="hl-4">false</span><span class="hl-2">);</span><br/><span class="hl-0">// 'First'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">shouldBeFirst</span><span class="hl-2"> = </span><span class="hl-1">firstDefined</span><span class="hl-2">(</span><span class="hl-3">'Fallback'</span><span class="hl-2">, </span><span class="hl-3">'First'</span><span class="hl-2">, </span><span class="hl-4">null</span><span class="hl-2">, </span><span class="hl-4">false</span><span class="hl-2">, </span><span class="hl-9">0</span><span class="hl-2">, </span><span class="hl-4">NaN</span><span class="hl-2">);</span>
|
|
10
10
|
</code><button type="button">Copy</button></pre>
|
|
11
11
|
|
|
12
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
12
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/first-where/first-where.mts#L112">first-where/first-where.mts:112</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -7,4 +7,4 @@ the predicate.</p>
|
|
|
7
7
|
</div></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">remaining</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="#firstwheret">T</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>The remaining values beyond the first to check.</p>
|
|
8
8
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="#firstwheret">T</a></h4><p>The first value for where predicate returns true for the given argument value.
|
|
9
9
|
If first and all values of remaining fail the predicate then fallback is returned.</p>
|
|
10
|
-
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
10
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/first-where/first-where.mts#L20">first-where/first-where.mts:20</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>formatDateTime | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-fn.html">@zthun/helpful-fn</a></li><li><a href="" aria-current="page">formatDateTime</a></li></ul><h1>Function formatDateTime</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="formatdatetime"><span class="tsd-kind-call-signature">formatDateTime</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-fn.ZDateTime.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTime</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../types/_zthun_helpful-fn.ZDateTimeOptions.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTimeOptions</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#formatdatetime" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Formats a given value.</p>
|
|
2
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <a href="../types/_zthun_helpful-fn.ZDateTime.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTime</a></span><div class="tsd-comment tsd-typography"><p>The value to format.</p>
|
|
3
|
+
</div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../types/_zthun_helpful-fn.ZDateTimeOptions.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTimeOptions</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>The given options for the format.</p>
|
|
4
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>If value is null or undefined, then the empty string is returned.
|
|
5
|
+
If value is a string, then the date is guessed from the string and
|
|
6
|
+
reformatted to the format specified by options. Otherwise,
|
|
7
|
+
the date or number specified by value is formatted to the culture,
|
|
8
|
+
timezone, and format specified in the options.</p>
|
|
9
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/date/format-date.mts#L60">date/format-date.mts:60</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>guessDateTime | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-fn.html">@zthun/helpful-fn</a></li><li><a href="" aria-current="page">guessDateTime</a></li></ul><h1>Function guessDateTime</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="guessdatetime"><span class="tsd-kind-call-signature">guessDateTime</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-fn.ZDateTime.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTime</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../types/_zthun_helpful-fn.ZDateTimeOptions.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTimeOptions</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><a href="#guessdatetime" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Similar to <a href="_zthun_helpful-fn.parseDateTime.html" class="tsd-kind-function">parseDateTime</a> but tries multiple supported formats.</p>
|
|
2
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <a href="../types/_zthun_helpful-fn.ZDateTime.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTime</a></span><div class="tsd-comment tsd-typography"><p>The value to parse that may result in a date.</p>
|
|
3
|
+
</div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../types/_zthun_helpful-fn.ZDateTimeOptions.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTimeOptions</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>The options for guessing the date. These will be forwarded to parse
|
|
4
|
+
for processing.</p>
|
|
5
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/date/guess-date.mts#L14">date/guess-date.mts:14</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -5,4 +5,4 @@ in false.</p>
|
|
|
5
5
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">candidate</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>The object to test.</p>
|
|
6
6
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">candidate</span> <span class="tsd-signature-keyword">is</span> <span class="tsd-signature-symbol">{}</span></h4><p>True if candidate is the empty object or
|
|
7
7
|
null. False otherwise.</p>
|
|
8
|
-
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
8
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/empty/is-empty-object.mts#L15">empty/is-empty-object.mts:15</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>isEnum | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-fn.html">@zthun/helpful-fn</a></li><li><a href="" aria-current="page">isEnum</a></li></ul><h1>Function isEnum</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="isenum"><span class="tsd-kind-call-signature">isEnum</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isenumtenum">TEnum</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">enumeration</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#isenumtenum">TEnum</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">candidate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-kind-parameter">candidate</span> <span class="tsd-signature-keyword">is</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#isenumtenum">TEnum</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#isenumtenum">TEnum</a><span class="tsd-signature-symbol">]</span><a href="#isenum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets whether the candidate can represent an enumeration object of type TEnum.</p>
|
|
2
|
+
<p>This is mostly helpful for type guarding value options in a type.</p>
|
|
3
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="isenumtenum"><span class="tsd-kind-type-parameter">TEnum</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">enumeration</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="#isenumtenum">TEnum</a></span><div class="tsd-comment tsd-typography"><p>The enumeration object that contains the values.</p>
|
|
4
|
+
</div></li><li><span><span class="tsd-kind-parameter">candidate</span>: <span class="tsd-signature-type">unknown</span></span><div class="tsd-comment tsd-typography"><p>The candidate to check.</p>
|
|
5
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">candidate</span> <span class="tsd-signature-keyword">is</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#isenumtenum">TEnum</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#isenumtenum">TEnum</a><span class="tsd-signature-symbol">]</span></h4><p>True if candidate can represents one of the white listed
|
|
6
|
+
object values in enumeration.</p>
|
|
7
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/enum/is-enum.mts#L15">enum/is-enum.mts:15</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">// 'a b d'</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">joinBySpace</span><span class="hl-2"> = </span><span class="hl-1">joinDefined</span><span class="hl-2">(</span><span class="hl-3">' '</span><span class="hl-2">, </span><span class="hl-3">'a'</span><span class="hl-2">, </span><span class="hl-3">'b'</span><span class="hl-2">, [</span><span class="hl-3">'c'</span><span class="hl-2">, </span><span class="hl-4">false</span><span class="hl-2">], </span><span class="hl-4">null</span><span class="hl-2">, </span><span class="hl-4">undefined</span><span class="hl-2">, [</span><span class="hl-3">'d'</span><span class="hl-2">, </span><span class="hl-4">true</span><span class="hl-2">]);</span><br/><span class="hl-0">// (Empty String)</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">joinEmpty</span><span class="hl-2"> = </span><span class="hl-1">joinDefined</span><span class="hl-2">(</span><span class="hl-3">'?'</span><span class="hl-2">);</span>
|
|
7
7
|
</code><button type="button">Copy</button></pre>
|
|
8
8
|
|
|
9
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
9
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/join-defined/join-defined.mts#L35">join-defined/join-defined.mts:35</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -20,7 +20,7 @@ null or undefined.</p>
|
|
|
20
20
|
or undefined, otherwise, the fallback is returned.
|
|
21
21
|
If val is a promise and rejects, then fallback is
|
|
22
22
|
also returned.</p>
|
|
23
|
-
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
23
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/obligation/obligation.mts#L63">obligation/obligation.mts:63</a></li></ul></aside></div></li><li class=""><div class="tsd-signature tsd-anchor-link" id="optional-1"><span class="tsd-kind-call-signature">optional</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#optionalt-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-fn.ZObligatedValue.html" class="tsd-signature-type tsd-kind-type-alias">ZObligatedValue</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#optionalt-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#optionalt-1">T</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><a href="#optional-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allows a value to be null or undefined and has a fallback.</p>
|
|
24
24
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="optionalt-1"><span class="tsd-kind-type-parameter">T</span></span><div class="tsd-comment tsd-typography"><p>The type of value that is being checked.</p>
|
|
25
25
|
</div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">val</span>: <a href="../types/_zthun_helpful-fn.ZObligatedValue.html" class="tsd-signature-type tsd-kind-type-alias">ZObligatedValue</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#optionalt-1">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The value to check. This can be a promise
|
|
26
26
|
that can return null or undefined in addition to the
|
|
@@ -29,4 +29,4 @@ value.</p>
|
|
|
29
29
|
or undefined, otherwise, null is returned.
|
|
30
30
|
If val is a promise and rejects, then null is
|
|
31
31
|
also returned.</p>
|
|
32
|
-
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
32
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/obligation/obligation.mts#L81">obligation/obligation.mts:81</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>parseDateTime | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-fn.html">@zthun/helpful-fn</a></li><li><a href="" aria-current="page">parseDateTime</a></li></ul><h1>Function parseDateTime</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="parsedatetime"><span class="tsd-kind-call-signature">parseDateTime</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-fn.ZDateTime.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTime</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../types/_zthun_helpful-fn.ZDateTimeOptions.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTimeOptions</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><a href="#parsedatetime" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Parses a string value back to a date format.</p>
|
|
2
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <a href="../types/_zthun_helpful-fn.ZDateTime.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTime</a></span><div class="tsd-comment tsd-typography"><p>The value to parse</p>
|
|
3
|
+
</div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../types/_zthun_helpful-fn.ZDateTimeOptions.html" class="tsd-signature-type tsd-kind-type-alias">ZDateTimeOptions</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>The options to parse with. The most important option here is format.
|
|
4
|
+
If the format is not specified, then the standard zoned ISO 8601
|
|
5
|
+
format is used. The timezone is also used in the case the date
|
|
6
|
+
does not supply it for string values. If the timezone is not specified
|
|
7
|
+
then the users timezone is assumed. Finally, the cultural local will
|
|
8
|
+
default to the users current culture if not specified.</p>
|
|
9
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></h4><p>The date object parsed from the value. Returns null
|
|
10
|
+
if the value parsed with the given options results in an
|
|
11
|
+
invalid date.</p>
|
|
12
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/date/parse-date.mts#L28">date/parse-date.mts:28</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
the second item is the remainder of the string. If the string
|
|
6
6
|
does not start with any given candidates, then the first
|
|
7
7
|
item will be null and the second item will be str.</p>
|
|
8
|
-
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
8
|
+
<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/peel/peel.mts#L15">peel/peel.mts:15</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -14,4 +14,4 @@ be the remaining text of the string, including whitespace.</p>
|
|
|
14
14
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">const</span><span class="hl-2"> [</span><span class="hl-7">peeled</span><span class="hl-2">, </span><span class="hl-7">rest</span><span class="hl-2">] = </span><span class="hl-1">peelBetween</span><span class="hl-2">(</span><span class="hl-3">'[a, b, [c1, c2],[d]] other'</span><span class="hl-2">, </span><span class="hl-3">'['</span><span class="hl-2"> </span><span class="hl-3">']'</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Outputs 'a, b, [c1, c2], [d]'</span><br/><span class="hl-6">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-6">peeled</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Outputs ' other' - white space is included'</span><br/><span class="hl-6">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-6">rest</span><span class="hl-2">);</span>
|
|
15
15
|
</code><button type="button">Copy</button></pre>
|
|
16
16
|
|
|
17
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
17
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/57fc32a943d2705d979f61928e23aebb428d908c/packages/helpful-fn/src/peel/peel.mts#L62">peel/peel.mts:62</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|