Methods
arrayOf(number) → {Array.<number>}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
number |
number
|
Returns:
- Type:
-
Array.<number>
arrayToChunks(array, count) → {array}
Split array to array of smaller chunks
- Source:
Parameters:
Name | Type | Description |
---|---|---|
array |
Array.<any>
|
|
count |
number
|
Returns:
- Type:
-
array
arrayToHash(array, selectoropt) → {object}
Convert array to hash
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
array |
Array.<any>
|
||
selector |
string
|
<optional> |
Returns:
- Type:
-
object
arrayToObject(array, keyFieldopt) → {object}
Convert array to object
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
array |
Array.<any>
|
||
keyField |
string
|
<optional> |
Returns:
- Type:
-
object
bindTo(context, funcs)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
object
|
|
funcs |
ceilToFixed(float, digits) → {number}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
float |
number
|
|
digits |
number
|
Returns:
- Type:
-
number
concatItems(items, key)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
items |
Array.<any>
|
|
key |
string
|
documentOffset(documentContainer, node) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
documentContainer |
node
|
|
node |
Node
|
Returns:
- Type:
-
Object
escapeDomUrl(url) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
string
|
Returns:
- Type:
-
string
escapeFileName(filename) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filename |
string
|
Returns:
- Type:
-
string
eventCoordinates(event, args) → {*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
event |
||
args |
Returns:
- Type:
-
*
formatDate(date, args) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
date |
Date
|
|
args |
Returns:
- Type:
-
string
formatDatesRange(dates, options, locale) → {string|null|*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
dates |
Array.<Date>
|
|
options |
object
|
|
locale |
string
|
Returns:
- Type:
-
string
|null
|*
formatNumber(number, digits) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
number |
number
|
|
digits |
number
|
Returns:
- Type:
-
string
getDistance(lat1, lon1, lat2, lon2) → {number}
Haversine formula
- Source:
Parameters:
Name | Type | Description |
---|---|---|
lat1 |
number
|
Latitude coordinate 1 |
lon1 |
number
|
Longitude coordinate 1 |
lat2 |
number
|
Latitude coordinate 2 |
lon2 |
number
|
Longitude coordinate 1 |
Returns:
- Type:
-
number
getID() → {string}
Pseudo-random ID generator
- Source:
Returns:
- Type:
-
string
Generated ID (4 symbols)
getMedia(node, query) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
node |
Node
|
|
query |
Returns:
- Type:
-
boolean
getPage(location) → {number|number}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
location |
object
|
Returns:
- Type:
-
number
|number
getParamReplacer(typesValidation)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
typesValidation |
getPrefixed(styles) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
styles |
object
|
Returns:
- Type:
-
object
getQuery(search) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
search |
string
|
Returns:
- Type:
-
string
getRadian(degrees) → {number}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
degrees |
number
|
Returns:
- Type:
-
number
radian
getSearch(query, prefix) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
object
|
|
prefix |
string
|
Returns:
- Type:
-
string
getSubTheme(theme, prefix) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
theme |
object
|
|
prefix |
string
|
Returns:
- Type:
-
Object
getUID() → {string}
UUID generator
- Source:
Returns:
- Type:
-
string
Generated UUID string
getValidatedPath(path, override) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
|
override |
object
|
Returns:
- Type:
-
string
has(args) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
args |
Returns:
- Type:
-
boolean
hashToArray(hash) → {array}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
hash |
object
|
Returns:
- Type:
-
array
invoke(fn, args) → {*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
fn |
function
|
|
args |
Returns:
- Type:
-
*
invokeOn(context, fn, args) → {*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
object
|
|
fn |
function
|
|
args |
Returns:
- Type:
-
*
isMobileTouchDevice(window) → {boolean}
Checks if user client is a mobile device
- Source:
Parameters:
Name | Type | Description |
---|---|---|
window |
Object
|
Returns:
- Type:
-
boolean
isModelEmpty(model, skipopt) → {boolean}
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
model |
object
|
||
skip |
Array.<any>
|
<optional> |
Returns:
- Type:
-
boolean
isPathActive(path, fullPath) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
|
fullPath |
string
|
Returns:
- Type:
-
boolean
isSameArray(source, target, optionsopt) → {boolean}
Compare two arrays
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
source |
Array.<any>
|
||
target |
Array.<any>
|
||
options |
object
|
<optional> |
Returns:
- Type:
-
boolean
isSameCollection(source, target) → {boolean}
Compare two object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
source |
object
|
|
target |
object
|
Returns:
- Type:
-
boolean
isSameHash(hash1, hash2) → {boolean}
Compare two hashes
- Source:
Parameters:
Name | Type | Description |
---|---|---|
hash1 |
string
|
|
hash2 |
string
|
Returns:
- Type:
-
boolean
mergeThemes(baseTheme, otherTheme) → {Object|*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
baseTheme |
object
|
|
otherTheme |
object
|
Returns:
- Type:
-
Object
|*
offset(node) → {Object|Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
node |
Node
|
Returns:
- Type:
-
Object
|Object
position(node) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
node |
Node
|
Returns:
- Type:
-
Object
preloadImage(Loader, url, done) → {*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
Loader |
||
url |
string
|
|
done |
Returns:
- Type:
-
*
preventDefault(event) → {*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
event |
Returns:
- Type:
-
*
reverse(arr) → {array}
Reverse (not on place) an array
- Source:
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array.<any>
|
Returns:
- Type:
-
array
screenPosition(node) → {DOMRect}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
node |
Node
|
Returns:
- Type:
-
DOMRect
screenSize(node) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
node |
Node
|
Returns:
- Type:
-
Object
scroll(node) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
node |
Node
|
Returns:
- Type:
-
Object
setReferrer(pathname, referrer) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
pathname |
string
|
|
referrer |
string
|
Returns:
- Type:
-
string
size(node) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
node |
Node
|
Returns:
- Type:
-
Object
stopPropagation(event) → {*}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
event |
Returns:
- Type:
-
*
stripOriginFromUrl(url, origin) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
string
|
|
origin |
string
|
Returns:
- Type:
-
string
stripPrefix(key, prefix) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
|
prefix |
string
|
Returns:
- Type:
-
string