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: numberoldMax: numbernewMin: numbernewMax: numbervalue: number- returns
number
-
r: numberg: numberb: number- returns
string | null
-
min?: number, default is0max?: number, default is1- returns
number
-
query: stringcontext?: HTMLElement, default isdocument- returns
HTMLElement | null
-
query: stringcontext?: HTMLElement, default isdocument- returns
Array<HTMLElement> | null
-
element: HTMLElementproperty: Kvalue: CSSStyleDeclaration[K]
-
element: HTMLElementproperties: Record<K, CSSStyleDeclaration[K]>
-
eventType: keyof ElementEventMapcallback: EventListenerOrEventListenerObject
-
eventType: keyof ElementEventMapcallback: EventListenerOrEventListenerObject
-
attributeName: stringvalue?: string- returns
stringifvalueis missing - returns
undefinedifvalueis passed