@zthun/helpful-web 6.3.0 → 6.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons.js +1 -1
- package/dist/assets/icons.svg +1 -1
- package/dist/assets/main.js +1 -1
- package/dist/assets/search.js +1 -1
- package/dist/assets/style.css +66 -21
- package/dist/classes/_zthun_helpful_brands.ZBrandBuilder.html +44 -44
- package/dist/classes/_zthun_helpful_fn.ZAssert.html +6 -6
- package/dist/classes/_zthun_helpful_fn.ZDeserializeJson.html +5 -5
- package/dist/classes/_zthun_helpful_fn.ZDeserializeTry.html +5 -5
- package/dist/classes/_zthun_helpful_fn.ZQuadrilateralBuilder.html +12 -12
- package/dist/classes/_zthun_helpful_fn.ZQuadrilateralCornersBuilder.html +14 -14
- package/dist/classes/_zthun_helpful_fn.ZRectangle.html +26 -17
- package/dist/classes/_zthun_helpful_fn.ZSerializeJson.html +3 -3
- package/dist/classes/_zthun_helpful_internet.ZCookieBuilder.html +17 -17
- package/dist/classes/_zthun_helpful_internet.ZEmailBuilder.html +9 -9
- package/dist/classes/_zthun_helpful_internet.ZEmailContactAddressBuilder.html +6 -6
- package/dist/classes/_zthun_helpful_internet.ZEmailContactBuilder.html +9 -9
- package/dist/classes/_zthun_helpful_internet.ZEmailEnvelopeBuilder.html +13 -13
- package/dist/classes/_zthun_helpful_internet.ZServerBuilder.html +10 -10
- package/dist/classes/_zthun_helpful_query.ZDataFilterFields.html +3 -3
- package/dist/classes/_zthun_helpful_query.ZDataMatchAlways.html +3 -3
- package/dist/classes/_zthun_helpful_query.ZDataMatchOptional.html +4 -4
- package/dist/classes/_zthun_helpful_query.ZDataRequestBuilder.html +11 -11
- package/dist/classes/_zthun_helpful_query.ZDataSearchFields.html +4 -4
- package/dist/classes/_zthun_helpful_query.ZDataSearchText.html +3 -3
- package/dist/classes/_zthun_helpful_query.ZDataSourceStatic.html +10 -10
- package/dist/classes/_zthun_helpful_query.ZDataSourceStaticOptionsBuilder.html +10 -10
- package/dist/classes/_zthun_helpful_query.ZFilterBinaryBuilder.html +15 -15
- package/dist/classes/_zthun_helpful_query.ZFilterCollectionBuilder.html +11 -11
- package/dist/classes/_zthun_helpful_query.ZFilterDeserialize.html +4 -4
- package/dist/classes/_zthun_helpful_query.ZFilterLogicBuilder.html +10 -10
- package/dist/classes/_zthun_helpful_query.ZFilterSerialize.html +3 -3
- package/dist/classes/_zthun_helpful_query.ZFilterUnaryBuilder.html +9 -9
- package/dist/classes/_zthun_helpful_query.ZMetadataBuilder.html +23 -23
- package/dist/classes/_zthun_helpful_query.ZPageBuilder.html +10 -10
- package/dist/classes/_zthun_helpful_query.ZSortBuilder.html +8 -8
- package/dist/classes/_zthun_helpful_query.ZSortDeserialize.html +4 -4
- package/dist/classes/_zthun_helpful_query.ZSortSerialize.html +3 -3
- package/dist/classes/_zthun_helpful_query.ZSorterSingle.html +6 -6
- package/dist/classes/_zthun_helpful_query.ZWellKnownIconClasses.html +11 -11
- package/dist/classes/_zthun_helpful_react.ZFileSelect.html +4 -4
- package/dist/classes/_zthun_helpful_validation.EqualsOtherPropertyValidator.html +3 -3
- package/dist/classes/_zthun_helpful_validation.IsDataURILimitValidator.html +3 -3
- package/dist/classes/_zthun_helpful_validation.IsNotWhiteSpaceValidator.html +3 -3
- package/dist/classes/_zthun_helpful_validation.RequiresOtherPropertyValidator.html +3 -3
- package/dist/enums/_zthun_helpful_fn.ZHorizontalAnchor.html +6 -6
- package/dist/enums/_zthun_helpful_fn.ZOrientation.html +5 -5
- package/dist/enums/_zthun_helpful_fn.ZVerticalAnchor.html +6 -6
- 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 +5 -5
- package/dist/enums/_zthun_helpful_query.ZOperatorLogic.html +5 -5
- package/dist/enums/_zthun_helpful_query.ZOperatorUnary.html +5 -5
- package/dist/enums/_zthun_helpful_query.ZSortDirection.html +5 -5
- package/dist/functions/_zthun_helpful_fn.bash.html +3 -3
- package/dist/functions/_zthun_helpful_fn.commaJoinDefined.html +4 -4
- package/dist/functions/_zthun_helpful_fn.countBuckets.html +3 -3
- package/dist/functions/_zthun_helpful_fn.createError.html +3 -3
- package/dist/functions/_zthun_helpful_fn.createGuid.html +4 -4
- package/dist/functions/_zthun_helpful_fn.css.html +3 -3
- package/dist/functions/_zthun_helpful_fn.cssJoinDefined.html +4 -4
- package/dist/functions/_zthun_helpful_fn.firstDefined.html +3 -3
- package/dist/functions/_zthun_helpful_fn.firstTruthy.html +3 -3
- package/dist/functions/_zthun_helpful_fn.firstWhere.html +2 -2
- package/dist/functions/_zthun_helpful_fn.html.html +3 -3
- package/dist/functions/_zthun_helpful_fn.isEmptyObject.html +2 -2
- package/dist/functions/_zthun_helpful_fn.javascript.html +3 -3
- package/dist/functions/_zthun_helpful_fn.joinDefined.html +3 -3
- package/dist/functions/_zthun_helpful_fn.js.html +3 -3
- package/dist/functions/_zthun_helpful_fn.markdown.html +3 -3
- package/dist/functions/_zthun_helpful_fn.md.html +3 -3
- package/dist/functions/_zthun_helpful_fn.optional.html +8 -8
- package/dist/functions/_zthun_helpful_fn.peel.html +2 -2
- package/dist/functions/_zthun_helpful_fn.peelBetween.html +3 -3
- package/dist/functions/_zthun_helpful_fn.pickBy.html +2 -2
- package/dist/functions/_zthun_helpful_fn.pickDataAttributes.html +2 -2
- package/dist/functions/_zthun_helpful_fn.pickDefined.html +2 -2
- package/dist/functions/_zthun_helpful_fn.pipeJoinDefined.html +4 -4
- package/dist/functions/_zthun_helpful_fn.required.html +3 -3
- package/dist/functions/_zthun_helpful_fn.semiColonJoinDefined.html +4 -4
- package/dist/functions/_zthun_helpful_fn.setFirst.html +3 -3
- package/dist/functions/_zthun_helpful_fn.sh.html +3 -3
- package/dist/functions/_zthun_helpful_fn.sleep.html +7 -7
- package/dist/functions/_zthun_helpful_fn.spaceJoinDefined.html +4 -4
- package/dist/functions/_zthun_helpful_fn.tag.html +3 -3
- package/dist/functions/_zthun_helpful_fn.tryFallback.html +7 -7
- package/dist/functions/_zthun_helpful_fn.tryFallbackAsync.html +7 -7
- package/dist/functions/_zthun_helpful_fn.ts.html +3 -3
- package/dist/functions/_zthun_helpful_fn.typescript.html +3 -3
- package/dist/functions/_zthun_helpful_fn.zsh.html +3 -3
- package/dist/functions/_zthun_helpful_node.walk.html +3 -3
- package/dist/functions/_zthun_helpful_query.isBinaryFilter.html +2 -2
- package/dist/functions/_zthun_helpful_query.isBinaryOperator.html +2 -2
- package/dist/functions/_zthun_helpful_query.isCollectionFilter.html +2 -2
- package/dist/functions/_zthun_helpful_query.isCollectionOperator.html +2 -2
- package/dist/functions/_zthun_helpful_query.isLogicFilter.html +2 -2
- package/dist/functions/_zthun_helpful_query.isLogicOperator.html +2 -2
- package/dist/functions/_zthun_helpful_query.isUnaryFilter.html +2 -2
- package/dist/functions/_zthun_helpful_query.isUnaryOperator.html +2 -2
- package/dist/functions/_zthun_helpful_react.asStateData.html +8 -8
- package/dist/functions/_zthun_helpful_react.asStateError.html +2 -2
- package/dist/functions/_zthun_helpful_react.isStateErrored.html +2 -2
- package/dist/functions/_zthun_helpful_react.isStateLoaded.html +2 -2
- package/dist/functions/_zthun_helpful_react.isStateLoading.html +2 -2
- package/dist/functions/_zthun_helpful_react.useAmbassadorState.html +9 -9
- package/dist/functions/_zthun_helpful_react.useAsyncState.html +2 -2
- package/dist/functions/_zthun_helpful_react.useFileSelect.html +2 -2
- package/dist/functions/_zthun_helpful_react.useKeyboardActivate.html +2 -2
- package/dist/functions/_zthun_helpful_react.useMoreViewState.html +2 -2
- package/dist/functions/_zthun_helpful_react.usePageViewState.html +2 -2
- package/dist/functions/_zthun_helpful_react.useStateAsArray.html +2 -2
- package/dist/functions/_zthun_helpful_react.useWindowService.html +2 -2
- package/dist/functions/_zthun_helpful_validation.EqualsOtherProperty.html +2 -2
- package/dist/functions/_zthun_helpful_validation.IsDataURILimit.html +2 -2
- package/dist/functions/_zthun_helpful_validation.IsNotWhiteSpace.html +2 -2
- package/dist/functions/_zthun_helpful_validation.RequiresOtherProperty.html +2 -2
- package/dist/hierarchy.html +1 -1
- package/dist/index.html +2 -2
- package/dist/interfaces/_zthun_helpful_brands.IZBrand.html +7 -7
- package/dist/interfaces/_zthun_helpful_fn.IZDeserialize.html +4 -4
- package/dist/interfaces/_zthun_helpful_fn.IZPoint2d.html +4 -4
- package/dist/interfaces/_zthun_helpful_fn.IZPoint3d.html +5 -5
- package/dist/interfaces/_zthun_helpful_fn.IZQuadrilateral.html +6 -6
- package/dist/interfaces/_zthun_helpful_fn.IZQuadrilateralCorners.html +3 -3
- package/dist/interfaces/_zthun_helpful_fn.IZSerialize.html +3 -3
- package/dist/interfaces/_zthun_helpful_internet.IZCookie.html +9 -9
- package/dist/interfaces/_zthun_helpful_internet.IZEmail.html +5 -5
- package/dist/interfaces/_zthun_helpful_internet.IZEmailContact.html +5 -5
- package/dist/interfaces/_zthun_helpful_internet.IZEmailEnvelope.html +6 -6
- package/dist/interfaces/_zthun_helpful_internet.IZServer.html +6 -6
- package/dist/interfaces/_zthun_helpful_node.ZWalkOptions.html +6 -6
- package/dist/interfaces/_zthun_helpful_query.IZDataMatch.html +3 -3
- package/dist/interfaces/_zthun_helpful_query.IZDataRequest.html +10 -10
- package/dist/interfaces/_zthun_helpful_query.IZDataRequestQuery.html +7 -7
- package/dist/interfaces/_zthun_helpful_query.IZDataSource.html +4 -4
- package/dist/interfaces/_zthun_helpful_query.IZDataSourceStaticOptions.html +5 -5
- package/dist/interfaces/_zthun_helpful_query.IZFilterBinary.html +6 -6
- package/dist/interfaces/_zthun_helpful_query.IZFilterCollection.html +6 -6
- package/dist/interfaces/_zthun_helpful_query.IZFilterLogic.html +5 -5
- package/dist/interfaces/_zthun_helpful_query.IZFilterMetadata.html +3 -3
- package/dist/interfaces/_zthun_helpful_query.IZFilterOperator.html +4 -4
- package/dist/interfaces/_zthun_helpful_query.IZFilterSubject.html +5 -5
- package/dist/interfaces/_zthun_helpful_query.IZMetadata.html +13 -13
- package/dist/interfaces/_zthun_helpful_query.IZPage.html +4 -4
- package/dist/interfaces/_zthun_helpful_query.IZSort.html +4 -4
- package/dist/interfaces/_zthun_helpful_query.IZSorter.html +5 -5
- package/dist/interfaces/_zthun_helpful_react.IZFileSelect.html +3 -3
- package/dist/interfaces/_zthun_helpful_react.IZKeyboardInteraction.html +4 -4
- package/dist/modules/_zthun_helpful_brands.html +2 -2
- package/dist/modules/_zthun_helpful_fn.html +2 -2
- package/dist/modules/_zthun_helpful_internet.html +2 -2
- package/dist/modules/_zthun_helpful_node.html +2 -2
- package/dist/modules/_zthun_helpful_proxy.html +2 -2
- package/dist/modules/_zthun_helpful_query.html +2 -2
- package/dist/modules/_zthun_helpful_react.html +2 -2
- package/dist/modules/_zthun_helpful_validation.html +2 -2
- package/dist/modules.html +2 -0
- package/dist/types/_zthun_helpful_fn.JoinListInputParameter.html +2 -2
- 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 +4 -4
- package/dist/types/_zthun_helpful_fn.ZObligatedValue.html +2 -2
- package/dist/types/_zthun_helpful_fn.ZQuadrilateralCornersLike.html +2 -2
- package/dist/types/_zthun_helpful_fn.ZQuadrilateralLike.html +2 -2
- package/dist/types/_zthun_helpful_fn.ZSideAnchor.html +2 -2
- package/dist/types/_zthun_helpful_query.IZFilter.html +2 -2
- package/dist/types/_zthun_helpful_query.IZFilterUnary.html +2 -2
- package/dist/types/_zthun_helpful_query.ZOperatorFilter.html +2 -2
- package/dist/types/_zthun_helpful_react.ZAmbassadorReducer.html +2 -2
- package/dist/types/_zthun_helpful_react.ZAmbassadorReducerRequired.html +2 -2
- package/dist/types/_zthun_helpful_react.ZAmbassadorSetCurrent.html +2 -2
- package/dist/types/_zthun_helpful_react.ZAsyncDataState.html +2 -2
- package/dist/types/_zthun_helpful_react.ZAsyncDataTuple.html +2 -2
- package/dist/types/_zthun_helpful_react.ZAsyncUseData.html +2 -2
- 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_brands.ZBrands.html +2 -2
- package/dist/variables/_zthun_helpful_fn._global.html +1 -1
- package/dist/variables/_zthun_helpful_query.ZBinaryComparators.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZCollectionComparators.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZOperatorsBinary.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZOperatorsCollection.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZOperatorsFilter.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZOperatorsLogic.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZOperatorsUnary.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZSortDirections.html +2 -2
- package/dist/variables/_zthun_helpful_query.ZUnaryComparators.html +2 -2
- package/dist/variables/_zthun_helpful_react.DefaultActivateCodes.html +2 -2
- package/dist/variables/_zthun_helpful_react.ZAsyncLoading.html +2 -2
- package/dist/variables/_zthun_helpful_react.ZFileSelectContext.html +2 -2
- package/dist/variables/_zthun_helpful_react.ZWindowServiceContext.html +2 -2
- package/package.json +12 -12
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>optional | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Param: val" class="tsd-anchor"></a>Param: val<a href="#Param: val" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The value to check. This can be a promise
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.optional.html">optional</a></li></ul><h1>Function optional</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Allows a value to be null or undefined and has a fallback.</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Param: val"><h4 class="tsd-anchor-link"><a id="Param: val" class="tsd-anchor"></a>Param: val<a href="#Param: val" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The value to check. This can be a promise
|
|
4
4
|
that can return null or undefined in addition to the
|
|
5
5
|
value.</p>
|
|
6
|
-
|
|
6
|
+
</div><div class="tsd-tag-Param: fallback"><h4 class="tsd-anchor-link"><a id="Param: fallback" class="tsd-anchor"></a>Param: fallback<a href="#Param: fallback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The fallback value in the case that val is
|
|
7
7
|
null or undefined.</p>
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
</div><div class="tsd-tag-Param: T"><h4 class="tsd-anchor-link"><a id="Param: T" class="tsd-anchor"></a>Param: T<a href="#Param: T" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The type of value that is being checked.</p>
|
|
9
|
+
</div><div class="tsd-tag-Returns"><h4 class="tsd-anchor-link"><a id="Returns" class="tsd-anchor"></a>Returns<a href="#Returns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>This method returns val if it is not null
|
|
10
10
|
or undefined, otherwise, the fallback is returned.
|
|
11
11
|
If val is a promise and rejects, then fallback is
|
|
12
12
|
also returned.</p>
|
|
13
|
-
</div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="optional" class="tsd-anchor"></a><span class="tsd-kind-call-signature">optional</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.optional.html#optional.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">fallback</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="_zthun_helpful_fn.optional.html#optional.T">T</a><span class="tsd-signature-symbol">></span><a href="#optional" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allows a value to be null or undefined and has a fallback.</p>
|
|
13
|
+
</div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="optional" class="tsd-anchor"></a><span class="tsd-kind-call-signature">optional</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.optional.html#optional.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">fallback</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="_zthun_helpful_fn.optional.html#optional.T">T</a><span class="tsd-signature-symbol">></span><a href="#optional" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allows a value to be null or undefined and has a fallback.</p>
|
|
14
14
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="optional.T" class="tsd-anchor"></a><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>
|
|
15
15
|
</div><div class="tsd-comment tsd-typography"></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="_zthun_helpful_fn.optional.html#optional.T">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
|
|
16
16
|
that can return null or undefined in addition to the
|
|
@@ -21,7 +21,7 @@ null or undefined.</p>
|
|
|
21
21
|
or undefined, otherwise, the fallback is returned.
|
|
22
22
|
If val is a promise and rejects, then fallback is
|
|
23
23
|
also returned.</p>
|
|
24
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
24
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/obligation/obligation.mts#L63">packages/helpful-fn/src/obligation/obligation.mts:63</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="optional-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">optional</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.optional.html#optional-1.T-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><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="_zthun_helpful_fn.optional.html#optional-1.T-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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allows a value to be null or undefined and has a fallback.</p>
|
|
25
25
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="optional-1.T-1" class="tsd-anchor"></a><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>
|
|
26
26
|
</div><div class="tsd-comment tsd-typography"></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="_zthun_helpful_fn.optional.html#optional-1.T-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
|
|
27
27
|
that can return null or undefined in addition to the
|
|
@@ -30,4 +30,4 @@ value.</p>
|
|
|
30
30
|
or undefined, otherwise, null is returned.
|
|
31
31
|
If val is a promise and rejects, then null is
|
|
32
32
|
also returned.</p>
|
|
33
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
33
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/obligation/obligation.mts#L81">packages/helpful-fn/src/obligation/obligation.mts:81</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>peel | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.peel.html">peel</a></li></ul><h1>Function peel</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="peel" class="tsd-anchor"></a><span class="tsd-kind-call-signature">peel</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.peel.html#peel.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span>, <span class="tsd-kind-parameter">candidates</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.peel.html#peel.T">T</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]</span><a href="#peel" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Peels a candidate string from the start of a string and splits it into two segments.</p>
|
|
3
3
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="peel.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">string</span> = <span class="tsd-signature-type">string</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">str</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The string to peel from.</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">candidates</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.peel.html#peel.T">T</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>The candidate list of values to peel from str.</p>
|
|
5
5
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.peel.html#peel.T">T</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]</span></h4><p>A tuple where the first item is the peeled string and
|
|
6
6
|
the second item is the remainder of the string. If the string
|
|
7
7
|
does not start with any given candidates, then the first
|
|
8
8
|
item will be null and the second item will be str.</p>
|
|
9
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
9
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/peel/peel.mts#L15">packages/helpful-fn/src/peel/peel.mts:15</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>peelBetween | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.peelBetween.html">peelBetween</a></li></ul><h1>Function peelBetween</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="peelBetween" class="tsd-anchor"></a><span class="tsd-kind-call-signature">peel<wbr/>Between</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span>, <span class="tsd-kind-parameter">open</span>, <span class="tsd-kind-parameter">close</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><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]</span><a href="#peelBetween" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Peels the values between an opening string set and a closing string set.</p>
|
|
3
3
|
<p>The actual value will handle issues with internal opening and closing brackets</p>
|
|
4
4
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">str</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The string to peel between.</p>
|
|
5
5
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">open</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The opening string. This will test
|
|
@@ -12,7 +12,7 @@ string and the rest of the string would be returned.</p>
|
|
|
12
12
|
the opening and closing bracket. Returns null if no string could
|
|
13
13
|
be found between an open and close pair. The second argument will
|
|
14
14
|
be the remaining text of the string, including whitespace.</p>
|
|
15
|
-
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><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
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><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>
|
|
16
16
|
</code><button type="button">Copy</button></pre>
|
|
17
17
|
|
|
18
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
18
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/peel/peel.mts#L62">packages/helpful-fn/src/peel/peel.mts:62</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>pickBy | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.pickBy.html">pickBy</a></li></ul><h1>Function pickBy</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="pickBy" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pick<wbr/>By</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickBy.html#pickBy.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span>, <span class="tsd-kind-parameter">target</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_zthun_helpful_fn.PickResult.html" class="tsd-signature-type tsd-kind-type-alias">PickResult</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickBy.html#pickBy.T">T</a><span class="tsd-signature-symbol">></span><a href="#pickBy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>A function that reduces an object to keys and values that match a predicate.</p>
|
|
3
3
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="pickBy.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">unknown</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">predicate</span>: <a href="../types/_zthun_helpful_fn.PickPredicate.html" class="tsd-signature-type tsd-kind-type-alias">PickPredicate</a></span><div class="tsd-comment tsd-typography"><p>The predicate to match the key and value against.</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">target</span>: <span class="tsd-signature-type">object</span></span><div class="tsd-comment tsd-typography"><p>The object to reduce.</p>
|
|
5
5
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_zthun_helpful_fn.PickResult.html" class="tsd-signature-type tsd-kind-type-alias">PickResult</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickBy.html#pickBy.T">T</a><span class="tsd-signature-symbol">></span></h4><p>A reduced object that only contains key-value pairs that match
|
|
6
6
|
the predicate.</p>
|
|
7
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
7
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/pick/pick.mts#L20">packages/helpful-fn/src/pick/pick.mts:20</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>pickDataAttributes | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.pickDataAttributes.html">pickDataAttributes</a></li></ul><h1>Function pickDataAttributes</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="pickDataAttributes" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pick<wbr/>Data<wbr/>Attributes</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickDataAttributes.html#pickDataAttributes.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_zthun_helpful_fn.PickResult.html" class="tsd-signature-type tsd-kind-type-alias">PickResult</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickDataAttributes.html#pickDataAttributes.T">T</a><span class="tsd-signature-symbol">></span><a href="#pickDataAttributes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>An alias to pickBy((k) => k.startsWith('data-')).</p>
|
|
3
3
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="pickDataAttributes.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">unknown</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">target</span>: <span class="tsd-signature-type">object</span></span><div class="tsd-comment tsd-typography"><p>The target object to reduce.</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_zthun_helpful_fn.PickResult.html" class="tsd-signature-type tsd-kind-type-alias">PickResult</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickDataAttributes.html#pickDataAttributes.T">T</a><span class="tsd-signature-symbol">></span></h4><p>The reduced object.</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
5
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/pick/pick.mts#L59">packages/helpful-fn/src/pick/pick.mts:59</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>pickDefined | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.pickDefined.html">pickDefined</a></li></ul><h1>Function pickDefined</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="pickDefined" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pick<wbr/>Defined</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickDefined.html#pickDefined.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_zthun_helpful_fn.PickResult.html" class="tsd-signature-type tsd-kind-type-alias">PickResult</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickDefined.html#pickDefined.T">T</a><span class="tsd-signature-symbol">></span><a href="#pickDefined" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>An alias to pickBy with a predicate of (_, v) => v != null.</p>
|
|
3
3
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="pickDefined.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">unknown</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">target</span>: <span class="tsd-signature-type">object</span></span><div class="tsd-comment tsd-typography"><p>The target object to reduce.</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_zthun_helpful_fn.PickResult.html" class="tsd-signature-type tsd-kind-type-alias">PickResult</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pickDefined.html#pickDefined.T">T</a><span class="tsd-signature-symbol">></span></h4><p>The reduced object.</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
5
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/pick/pick.mts#L46">packages/helpful-fn/src/pick/pick.mts:46</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>pipeJoinDefined | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="See" class="tsd-anchor"></a>See<a href="#See" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="_zthun_helpful_fn.joinDefined.html" class="tsd-kind-function">joinDefined</a> for more information and examples.</p>
|
|
4
|
-
</div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="pipeJoinDefined" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pipe<wbr/>Join<wbr/>Defined</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pipeJoinDefined.html#pipeJoinDefined.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">items</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#pipeJoinDefined" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="pipeJoinDefined.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">items</span>: <a href="../types/_zthun_helpful_fn.JoinListInputParameter.html" class="tsd-signature-type tsd-kind-type-alias">JoinListInputParameter</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pipeJoinDefined.html#pipeJoinDefined.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>The items to join.</p>
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.pipeJoinDefined.html">pipeJoinDefined</a></li></ul><h1>Function pipeJoinDefined</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Alias of joinList with a pipe delimiter.</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-See"><h4 class="tsd-anchor-link"><a id="See" class="tsd-anchor"></a>See<a href="#See" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="_zthun_helpful_fn.joinDefined.html" class="tsd-kind-function">joinDefined</a> for more information and examples.</p>
|
|
4
|
+
</div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="pipeJoinDefined" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pipe<wbr/>Join<wbr/>Defined</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pipeJoinDefined.html#pipeJoinDefined.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">items</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#pipeJoinDefined" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="pipeJoinDefined.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">items</span>: <a href="../types/_zthun_helpful_fn.JoinListInputParameter.html" class="tsd-signature-type tsd-kind-type-alias">JoinListInputParameter</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.pipeJoinDefined.html#pipeJoinDefined.T">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>The items to join.</p>
|
|
5
5
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>A string that joins the items that are defined, separated by a pipe delimiter.</p>
|
|
6
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
6
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/join-defined/join-defined.mts#L121">packages/helpful-fn/src/join-defined/join-defined.mts:121</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>required | Helpful</title><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><link rel="icon" href="../helpful.svg" />
|
|
2
|
-
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../
|
|
2
|
+
</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Helpful</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Helpful</a></li><li><a href="../modules/_zthun_helpful_fn.html">@zthun/helpful-fn</a></li><li><a href="_zthun_helpful_fn.required.html">required</a></li></ul><h1>Function required</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="required" class="tsd-anchor"></a><span class="tsd-kind-call-signature">required</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.required.html#required.T">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><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="_zthun_helpful_fn.required.html#required.T">T</a><span class="tsd-signature-symbol">></span><a href="#required" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Requires a value to be non null.</p>
|
|
3
3
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="required.T" class="tsd-anchor"></a><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>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></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="_zthun_helpful_fn.required.html#required.T">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The value to require. This can be a promise
|
|
5
5
|
that can return null or undefined in addition to the
|
|
6
6
|
value.</p>
|
|
7
7
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_zthun_helpful_fn.required.html#required.T">T</a><span class="tsd-signature-symbol">></span></h4><p>This method returns val if it is not null
|
|
8
8
|
or undefined, otherwise, an error is thrown.</p>
|
|
9
|
-
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Throws" class="tsd-anchor"></a>Throws<a href="#Throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>An error if the value is null or undefined.</p>
|
|
10
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
9
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-Throws"><h4 class="tsd-anchor-link"><a id="Throws" class="tsd-anchor"></a>Throws<a href="#Throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>An error if the value is null or undefined.</p>
|
|
10
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/cffdc645947069d32dcd73c87f0b40e230a5f2fb/packages/helpful-fn/src/obligation/obligation.mts#L30">packages/helpful-fn/src/obligation/obligation.mts:30</a></li></ul></aside></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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Helpful</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|