...
Name | Summary |
---|---|
isF | Checks if argument is a function. |
isA | Checks if argument is an array. |
isS | Checks if argument is a string. |
isO | Checks if argument is an object. |
contains | Checks if an array contains a value. |
areFunctions | Checks if given strings are names of functions on an API and whether the API has functions that are not listed. |
areFunctionsNonStrict | Checks if given strings are names of functions on an API. (Doesn't care about unlisted functions.) |
windowSize | Returns inner dimensions of the window minus given values. |
isMobile | Returns true if the device viewing the GUI is a mobile device. |
isChrome | Returns true if the browser being used is Chrome. |
isSafari | Returns true if the browser being used is Safari. |
isFirefox | Returns true if the browser being used is Firefox. |
debugOn | Returns true if the debug flag is turned on in query params. |
debug | Conditionally writes a debug message to the console. |
find | Searches through an array of objects looking for the object with a specific property name and property value and returns its index. |
inArray | Finds an item's index in the array. |
removeFromArray | Removes the first occurrence of the specified item from the array. |
isEmptyObject | Returns true if the object is empty (has no non-default properties). |
cap | Returns the given string with only the first letter capitalized. |
noPx | Return the argument without the 'px' suffix. |
noPxStyle | Return the element's style property without the 'px' suffix. |
endsWith | Checks if the given string ends with a given suffix. |
parseBitRate | Returns a Number version of the given string bit rate. |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isF(f); | f - the variable to check if it is a function |
|
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isA(a); | a - the variable to check if it is an array |
|
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isS(s); | s - the variable to check if it is a string |
|
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isO(o); | o - the variable to check if it is an object |
|
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.contains(a, x); |
| the index of false if -1 if |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.areFunctions(api, fnNames); |
| true if
false if
|
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.areFunctionsNonStrict(api, fnNames); |
| true if
false if
|
...
Example Usage | Arguments | Default Params | Return Value |
---|---|---|---|
fs.windowSize(offH, offW); |
|
| an object with members:
|
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isMobile(); | none | true if the device viewing the GUI is a mobile device false otherwise |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isChrome(); | none | true if the user is viewing the GUI in Google Chrome false otherwise |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isSafari(); | none | true if the user is viewing the GUI in Safari false otherwise |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isFirefox(); | none | true if the user is viewing the GUI in Mozilla Firefox false otherwise |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.debugOn(tag); | tag : string of which debug flag you are looking for | true if debug flag is turned on for
|
debug
Conditionally logs a debug message to the console. This function checks to see if the given tag is in the set of active debug flags, via a call to debugOn(). If the flag is active, the remaining arguments are passed to $log.debug() to write a debug message to the console. If the flag is not active, nothing is logged.
Example Usage | Arguments | Return Values |
---|---|---|
fs.debug(tag, arg1, arg2, ...); | tag: debug flag to test for arg1, arg2, ... : arguments passed to $log.debug() | none |
find
Searches through an array of objects looking for the object with a specific property name (tag) and property value (key) and returns its index.
Example Usage | Arguments | Default Params | Return Values |
---|---|---|---|
fs.find(key, array, tag); |
| tag : 'id' | the index of the object in the array, if found (the index may be 0 – not truthy!) -1 if it wasn't found |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.inArray(item, array); |
| the index of the item in the array, if found (the index may be 0 – not truthy!) -1 if it wasn't found |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.removeFromArray(item, array); |
| true if the removal was made false otherwise |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.isEmptyObject(obj); | obj : the object to check to see if it is empty | true if it is empty false otherwise |
...
Example Usage | Arguments | Return Value |
---|---|---|
fs.cap(s); | s : the string to properly capitalize | s properly capitalized |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.noPx(num); | num : string number with a 'px' you want to be turned into a number value | the number from the pixel string |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.noPxStyle(elem, prop); |
| the number value of the style property |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.endsWith(str, suffix); |
| true if the false otherwise |
...
Example Usage | Arguments | Return Values |
---|---|---|
fs.parseBitRate(str); | str : the string that you want the bit rate from | the number value of the bit rate |
...