fs.isF(f)
f
if it is a function, null
otherwisefs.isA(a)
a
if it is an array, null
otherwisefs.isS(s)
s
if it is a string, null
otherwisefs.isO(o)
o
if it is an object, null
otherwisefs.contains(a, x)
x
if it is in the array a
, otherwise returns -1
fs.areFunctions(api, fnNames)
api
: API object to checkfnNames
: array of function names expectedtrue
if functions defined on api
exactly matches fnNames
listfs.areFunctionsNonStrict(api, fnNames)
api
: API object to checkfnNames
: array of function names expectedtrue
if functions defined on api
include all fnNames
listfs.windowSize(offH, offW)
offH
if specified, is subtracted from window heightoffW
if specified, is subtracted from window width{ height: h, width: w }
fs.isMobile()
true
if the current browser is determined to be a mobile devicefs.isChrome()
true
if the current browser is determined to be Chromefs.isSafari()
true
if the current browser is determined to be Safarifs.isFirefox()
true
if the current browser is determined to be Firefoxfs.find(key, array, tag)
key
: The key (value of tagged property) to search forarray
: An array of objects to searchtag
: If not specified, defaults to "id"
-1
for no matchfs.inArray(item, array)
item
: the item to search forarray
: the array to search-1
for no matchfs.removeFromArray(item, array)
:
item
: the item to search for and removearray
: the array to searchtrue
if the item was found and removedfs.isEmptyObject(o)
true
if the object o
is empty (has no properties)fs.sameObjectProps(o1, o2)
true
if objects o1
and o2
have precisely the same set of property keysfs.containsObj(arr, obj)
true
if the array contains the objectsameObjectProps(...)
to determine the resultfs.cap(s)
s
with the first character capitalizedfs.eecode(h, w)
fs.noPx(num)
num
stripped of its "px"
suffix (if any)fs.noPxStyle(elem, prop)
"px"
suffixelem
: DOM elementprop
: Style property (e.g. "height")fs.endsWith(str, suffix)
true
if the given string str
ends with the specified suffix
fs.debugOn(tag)
true
if the specified debug tag is active?debug=txrx,foo
fs.debugOn('txrx')
and fs.debugOn('foo')
fs.debug(tag, arg1, arg2, ...)
tag
is setfs.debug('foo', '1 + 2 is', 1 + 2);
addToTrie(trie, word, data)
word
(converted to uppercase) to the specified trie
data structuredata
: the data associated with the word"added"
or "updated"
removeFromTrie(trie, word)
word
(converted to uppercase) from the specified trie
data structure"removed"
or "absent"
trieLookup(trie, word)
word
(converted to uppercase), in the specified trie
data structureundefined
: if the word is not in the trie-1
: for a partial match (word is a prefix of an existing word)data
: associated with the word, on an exact matchclassNames(a1, a2, ...)
var arr = ['foo', 'bar'];
var obj = {goo: 2, zoo: 3}
fs.classNames(arr, 'baz', obj)
"foo bar baz goo zoo"
fs.extend(protoProps, staticProps)