...
FnService is an Angular Factory in the Util module with the name fn.js
. It provides general purpose functions that are useful throughout the client-side application. To use these functions, see the documentation on injecting Angular services.
...
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. |
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.isMobile(); | none | true if the device viewing the GUI is a mobile device false otherwise |
isChrome
Returns true if the browser being used is Chrome.
Example Usage | Arguments | Return Values |
---|---|---|
fs.isChrome(); | none | true if the user is viewing the GUI in Google Chrome false otherwise |
isSafari
Returns true if the browser being used is Safari.
Example Usage | Arguments | Return Values |
---|---|---|
fs.isSafari(); | none | true if the user is viewing the GUI in Safari false otherwise |
isFirefox
Returns true if the browser being used is Firefox.
Example Usage | Arguments | Return Values |
---|---|---|
fs.isFirefox(); | none | true if the user is viewing the GUI in Mozilla Firefox false otherwise |
debugOn
Returns true if the debug flag is turned on in query params.
...