Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is a work in progress.

FnService - Function Service

...

isF

Short for "is Function". Checks if argument is a function.

Example UsageArgumentsReturn Values
fs.isF(f);

...

f - the variable to check if it is a function

...

Return Value

...

f if typeof is 'function'

...

...

null

...

 if f

...

 is not a function

...

isA

Short for "is Array"Checks if argument is an array.

Example UsageArgumentsReturn Values
fs.isA(a);
Arguments
a - the variable to check if it is an array

...

Return Value

...

a

...

...

 returns true

...

...

null

...

 if a

...

 is not an array

...

isS

Short for "is String". Checks if argument is a string.

Example UsageArgumentsReturn Values
fs.isS(s);
Arguments
s - the variable to check if it is a string

...

Return Value

...

 s if typeof is 'string'

...

...

null

...

 if s

...

 is not a string

...

isO

Short for "is Object"Checks if argument is an object.

Example UsageArgumentsReturn Values
fs.isO(o);
Arguments
o - the variable to check if it is an object

...

...

o if typeof is 'object' and the constructor is Object

...

...

null

...

 if o

...

 is not an object

...

contains

Checks if an array contains a value.

Example UsageArgumentsReturn Values
fs.contains(a, x);
Arguments

a - the array to search

x - the item to look for

Return Value

Truthy: The index of the item you are looking for.

...

the index of x if it is in a

false if a isn't an array

...

-1

...

if x

...

 isn't in the array

...

areFunctions

areFunctionsNonStrict

windowSize

Returns inner dimensions of the window minus given values.

Example UsageArgumentsDefault ParamsReturn Values
fs.windowSize(offH, offW);

offH -

offW -

offH: 0

offV: 0

 

 

isMobile

debugOn

find

inArray

...