# Class: RegistryBase

## RegistryBase()

Base class for all registries.

LocusZoom is plugin-extensible, and layouts are JSON-serializable objects that refer to desired features by name (not by class). This is achieved through the use of a central registry that holds a reference to each possible feature.

Each registry has some syntactical sugar to make it easier to, eg, modify layouts or create classes. This class is documented solely so that those helper methods can be referenced.

## Constructor

#### new RegistryBase()

Source:
  - registry/base.js, line 15

### Methods

#### add(name, item, overrideopt) → {*}

Add a new item to the registry

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`name` | String |  |  | The name of the item to add to the registry
`item` | * |  |  | The item to be added (constructor, value, etc)
`override` | boolean | <optional> | false | Allow redefining an existing item?

Source:
  - registry/base.js, line 39

##### Returns:

The actual object as added to the registry

Type
  *

#### get(name) → {function}

Return the registry member. If the registry stores classes, this returns the class, not the instance.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String |

Source:
  - registry/base.js, line 25

##### Returns:

Type
  function

#### has(name) → {boolean}

Check whether the specified item is registered

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String |

Source:
  - registry/base.js, line 61

##### Returns:

Type
  boolean

#### list() → {Array.<String>}

Names of each allowed

Source:
  - registry/base.js, line 69

##### Returns:

Type
  Array.<String>

#### remove(name) → {boolean}

Remove a datasource from the registry (if present)

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String |

Source:
  - registry/base.js, line 52

##### Returns:

True if item removed, false if item was never present

Type
  boolean