Gathering detailed insights and metrics for @ti-platform/aide-vueuse
Gathering detailed insights and metrics for @ti-platform/aide-vueuse
Gathering detailed insights and metrics for @ti-platform/aide-vueuse
Gathering detailed insights and metrics for @ti-platform/aide-vueuse
npm install @ti-platform/aide-vueuse
Typescript
Module System
Node Version
NPM Version
44.8
Supply Chain
90.2
Quality
85.3
Maintenance
100
Vulnerability
98.9
License
TypeScript (55.93%)
Vue (41.16%)
JavaScript (1.96%)
Shell (0.72%)
HTML (0.22%)
Total Downloads
2,017
Last Day
1
Last Week
4
Last Month
18
Last Year
952
120 Commits
1 Watching
1 Branches
1 Contributors
Latest Version
1.0.12
Package Id
@ti-platform/aide-vueuse@1.0.12
Unpacked Size
16.47 kB
Size
4.26 kB
File Count
12
NPM Version
10.1.0
Node Version
20.9.0
Publised On
07 Nov 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-20%
4
Compared to previous week
Last month
-88%
18
Compared to previous month
Last year
9.3%
952
Compared to previous year
This package contains utility functions that makes use @vueuse/core and its functions.
The state of the polling.
Enumeration Member | Value |
---|---|
FAILURE | 3 |
NOT_STARTED | 0 |
POLLING | 1 |
SUCCESS | 2 |
TIMEOUT | 4 |
ElementOrComponentWithEl:
HTMLElement
| {$el
:HTMLElement
; }
Either an HTMLElement
or a Vue component with the property $el
which is an HTMLElement
.
dom.ts:8
UsePollingRetVal: {
startPolling
: () =>UsePollingRetVal
;state
:ComputedRef
<PollingState
>; }
Return value of the usePolling function.
Name | Type | Description |
---|---|---|
startPolling | () => UsePollingRetVal | Start polling. |
state | ComputedRef <PollingState > | The current state of the polling. |
polling.ts:21
isPollingFailure(
state
):boolean
See if the given state is considered a failure, either it was considered a failure by the executing function or it had timed out.
Parameter | Type | Description |
---|---|---|
state | PollingState | The state to validate. |
boolean
Returns true if it is considered to be a failure, false otherwise.
polling.ts:40
useHeightCalc(
baseHeight
,elements
):ComputedRefWithControl
<string
>
In cases where we have an element where any of the height CSS styles is using the "calc" function, we may want to subtract from a base height the current height of some elements, this function allows for that.
Parameter | Type | Description |
---|---|---|
baseHeight | string | The base height to essentially subtract from. Ex: 90vh, 800px, 100% |
elements | Ref <ElementOrComponentWithEl , ElementOrComponentWithEl >[] | The list of elements or components with a singular root element whose height we will subtract from. |
ComputedRefWithControl
<string
>
dom.ts:17
usePolling(
fn
,intervalMs
,timeoutMs
):UsePollingRetVal
Keep executing the provided function until it returns a success, failure, or it has timed out. Note that the next polling will not start until the current task finishes.
Parameter | Type | Description |
---|---|---|
fn | () => Awaitable <PollingState > | The function to execute. The function should return PollingState.POLLING to have the polling to continue. Returning either PollingState.SUCCESS or PollingState.FAILURE will stop polling. |
intervalMs | number | The time in milliseconds between each poll. |
timeoutMs | number | The maximum time in milliseconds before it is considered a polling timeout. |
Return an object with the current state of the polling and function to start the polling.
polling.ts:54
No vulnerabilities found.
No security vulnerabilities found.