# utils

### Methods

#### (static) _hasClass(element, className) → {boolean}

Source:
  - utils/hasClass.js, line 10

Provides an ability to check if a DOM element contains a class string

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` |  |
`className` |  |

##### Returns:

Type
  boolean

#### (static) addClass(element, className) → {Object|*}

Source:
  - utils/addClass.js, line 9

App/Append new class string to the provided DOM element

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` |  |
`className` |  |

##### Returns:

Type
  Object | *

#### (static) closest(element, selector) → {null|ParentNode}

Source:
  - utils/closest.js, line 12

Iterate up the tree of DOM elements to find the closes match

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` |  |
`selector` |  |

##### Returns:

Type
  null | ParentNode

#### (static) formatNumberLeadingZeros(num, size) → {string}

Source:
  - utils/formatNumberLeadingZeros.js, line 9

Prepends 0 the provided number and returns the formated element as a string

##### Parameters:

Name | Type | Description
--- | --- | ---
`num` |  |
`size` | number |

##### Returns:

1 => 001

Type
  string

#### (static) isElement(o) → {Boolean}

Source:
  - utils/isElement.js, line 8

Returns true if it is a DOM element

##### Parameters:

Name | Type | Description
--- | --- | ---
`o` | Object |

##### Returns:

Type
  Boolean

#### (static) objectCount()

Source:
  - utils/objectCount.js, line 7

Returns a count of object from a query result

#### (static) objectIterator(obj, callback)

Source:
  - utils/objectIterator.js, line 8

Object iterator - best usage is for a list of DOM elements

##### Parameters:

Name | Type | Description
--- | --- | ---
`obj` |  |
`callback` |  |

#### (static) query("optional", CSS) → {Object|null|Array}

Source:
  - utils/query.js, line 19

Query selector, supports CSS element selection

Supports:

- Class selection: ".element"
- ID selection: "#element"
- Tag selection: "div"
- Multi depth selection: '.element ul li'

##### Parameters:

Name | Type | Description
--- | --- | ---
`"optional"` | Object |
`CSS` | String | element selector

##### Returns:

depending on the provided selector results can vary (null, node, NodeList array)

Type
  Object | null | Array

#### (static) remove()

Source:
  - utils/remove.js, line 7

Removes an HTML DOM element

#### (static) removeClass(element, className) → {Object|*}

Source:
  - utils/removeClass.js, line 9

Remove class string from provided DOM element

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` |  |
`className` |  |

##### Returns:

Type
  Object | *

#### (static) scrollEnabled(doc) → {boolean}

Source:
  - utils/scrollEnabled.js, line 8

Check if scrolling is enabled

##### Parameters:

Name | Type | Description
--- | --- | ---
`doc` |  |

##### Returns:

Type
  boolean

#### (static) sizeof(obj) → {Number}

Source:
  - utils/sizeof.js, line 11

returns the size of an Object or array

##### Parameters:

Name | Type | Description
--- | --- | ---
`obj` | Object |

##### Returns:

Type
  Number

#### (static) stringContains(str, partial) → {boolean}

Source:
  - utils/stringContains.js, line 9

A check if a string contains an entry of searched for term

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string |
`partial` | string |

##### Returns:

Type
  boolean

#### (static) stripHtml(html) → {string|string}

Source:
  - utils/stripHtml.js, line 10

Removes HTML tags from the provided input and returns only the text

- this is a very basic implementation and should be used carefully

##### Parameters:

Name | Type | Description
--- | --- | ---
`html` | string |

##### Returns:

Type
  string | string