This module is a simple collection of common functions.
Check out the dist/abs-utils.d.ts
file for a summary of what it contains.
"If I could marry a mathematical formula, it would be
proportionalRange()
." -Abstractn, 2019
This collection will be expanded in the future following my personal necessities.
Typescript:
https://abstractn.github.io/lib/abs-utils.ts
Javascript (with export):
https://abstractn.github.io/lib/abs-utils.js
Javascript (without export):
https://abstractn.github.io/lib/abs-utils.nx.js
Browser iclusion:
<script src="https://abstractn.github.io/lib/abs-utils.nx.js"></script>
-
oldMin: number
oldMax: number
newMin: number
newMax: number
value: number
- returns
number
-
r: number
g: number
b: number
- returns
string | null
-
min?: number
, default is0
max?: number
, default is1
- returns
number
-
query: string
context?: HTMLElement
, default isdocument
- returns
HTMLElement | null
-
query: string
context?: HTMLElement
, default isdocument
- returns
Array<HTMLElement> | null
-
element: HTMLElement
property: K
value: CSSStyleDeclaration[K]
-
element: HTMLElement
properties: Record<K, CSSStyleDeclaration[K]>
-
eventType: keyof ElementEventMap
callback: EventListenerOrEventListenerObject
-
eventType: keyof ElementEventMap
callback: EventListenerOrEventListenerObject
-
attributeName: string
value?: string
- returns
string
ifvalue
is missing - returns
undefined
ifvalue
is passed