# Hash | tablefilter v0.5.3 API Document

    import {Hash} from 'tablefilter/src/modules/hash.js'

public class | source

# Hash

Manages state via URL hash changes

## Constructor Summary

Public Constructor
public | constructor (state: State) Creates an instance of Hash |

## Member Summary

Public Members
public | emitter : Emitter Application event emitter instance |
public | state : State State object |

## Method Summary

Public Methods
public | destroy () Release Hash event subscriptions and clear fields |
public | init () Initializes the Hash object |
public | parse (hash: String): Object Converts a URL hash into a state JSON object |
public | sync () Applies current hash state to features |
public | update (state: State) Updates the URL hash based on a state change |

## Public Constructors

### public constructor(state: State) source

Creates an instance of Hash

#### Params:

Name | Type | Attribute | Description
state | State |  | Instance of State

## Public Members

### public emitter: Emitter source

Application event emitter instance

### public state: State source

State object

## Public Methods

### public destroy() source

Release Hash event subscriptions and clear fields

### public init() source

Initializes the Hash object

### public parse(hash: String): Object source

Converts a URL hash into a state JSON object

#### Params:

Name | Type | Attribute | Description
hash | String |  | URL hash fragment

#### Return:

Object | JSON object

### public sync() source

Applies current hash state to features

### public update(state: State) source

Updates the URL hash based on a state change

#### Params:

Name | Type | Attribute | Description
state | State |  | Instance of State