# Module: helpers

## helpers

Source:
  - helpers.js, line 3

### Members

#### <inner> is[type]

  Determine whether a variable is of the type specified in the function name, eg isNumber

  Types available are Null, Undefined, Object, Array, String, Number, Boolean, Function, RegExp, NaN and Infinite

  Source:
    - helpers.js, line 100

### Methods

#### <static> arrayPluck(arr, key) → {Array}

  Get a list of values with a common key from an array of objects

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `arr` | Array | The array of objects to search
  `key` | String | The key of the object to get

  Source:
    - helpers.js, line 57

  ##### Returns:

  Type
    Array

#### <static> isScalar(obj) → {bool}

  Determine whether an object is scalar

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `obj` | mixed |

  Source:
    - helpers.js, line 46

  ##### Returns:

  Type
    bool

#### <static> regexInArray(arr, pattern) → {Boolean}

  Determine if a value matching the passed regular expression is in the passed array

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `arr` | Array | The array to search
  `pattern` | RegExp | The pattern to match

  Source:
    - helpers.js, line 80

  ##### Returns:

  - If an array item matches the pattern
  Type
    Boolean

#### <static> stringTrim(str) → {String}

  Wrap String.prototype.trim in a way that is easily mappable

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `str` | String | The string to trim

  Source:
    - helpers.js, line 14

  ##### Returns:

  - The trimmed string
  Type
    String

#### <static> type(o) → {String}

  Get the type of the variable passed

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `o` | mixed |

  Source:
    - helpers.js, line 25
  See:
    - https://techblog.badoo.com/blog/2013/11/01/type-checking-in-javascript/
    - http://toddmotto.com/understanding-javascript-types-and-reliable-type-checking/

  ##### Returns:

  Type
    String