# Module: utils

Author:
  - Eduardo Perotta de Almeida
Source:
  - utils.js, line 3

### Methods

#### <static> createMethodSignature(error, data)

createMethodSignature Create default signature method object.

  createMethodSignature Create default signature method object

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `error` | string | object | The string or error object if have any
  `data` | object | array | number | string | boolean | Information about method execution

  Source:
    - utils.js, line 18

  ##### Returns:

  - signature - Default methods signature format { error, data }
    Type
      object
  - signature.error - Execution error
    Type
      string | object
  - signature.data - Execution data
    Type
      object | array | number | string | boolean

#### <static> getSearchTokenStream()

getSearchTokenStream generates a lunr search token.

  getSearchTokenStream generates a lunr search token. See lunr search
  Source:
    - utils.js, line 96

  ##### Returns:

  token
  Type
    array

#### <static> GUID()

GUID generates a Universally unique identifier string - alias to uuid().

  GUID generates a Universally unique identifier string - alias to uuid()
  Source:
    - utils.js, line 28

  ##### Returns:

  guid / uuid
  Type
    string

#### <static> mongooseToDexieTableString()

mongooseToDexieTableString convert given Mongoose schema to a Dexie Table columns configuration.

  mongooseToDexieTableString convert given Mongoose schema to a Dexie Table columns configuration.
  All columns inside returned configuration are indexed at IndexedDB prepend __id as local primary key and _id for remote primary key
  Source:
    - utils.js, line 67

  ##### Returns:

  Dexie table configuration string
  Type
    string

#### <static> toJSON(obj)

toJSON - stringify and parse an object
It uses native JSON internally.

  toJSON - stringify and parse an object
  It uses native JSON internally.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `obj` | string | object | Valid JSON object or string

  Source:
    - utils.js, line 52

  ##### Returns:

  new JSON object
  Type
    object

#### <static> uuid()

uuid generates a Universally unique identifier string.

  uuid generates a Universally unique identifier string
  Source:
    - utils.js, line 38

  ##### Returns:

  guid / uuid
  Type
    string

#### Search results