Skip to content

Commit

Permalink
Remove unused handler logic/state
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dail authored and Brandon Dail committed Feb 26, 2016
1 parent 04ad940 commit 7e433d7
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,18 @@
var scopedState = {
__uniqueID__: id,
callback: callback,
handlers: [],
active: {},
status: {},
_MediaQueryLists: {},
_rawMediaQueryLists: [],
_values: {},
queries: [],
handler: null,
defaultValue: null
}
_state[id] = scopedState;
return scopedState;
}


/**
* Registers a handler function. This is invoked
* whenever one of the MediaQueryList changes. It
* is passed the value matching the query, which
* is set in the `register` call.
* @param {Function} callback event handler
*/
function addHandler(callback) {
handler = callback;
}

/**
* Rough Regex to parse the value from a media query.
* For example, if the query is '(min-width: 768px)' it
Expand Down Expand Up @@ -143,7 +129,7 @@ function createQueryListener(id) {
}

/**
* Registers a map of queries and return values with the handler.
* Registers a map of queries and return values with the callback.
* @param {Object} values key/value map of queries/return values
*/
function mapValuesToQueryState(values, state, callback) {
Expand Down

0 comments on commit 7e433d7

Please sign in to comment.