utils/keybinding.js
function removeKeybindings (bindings, method) {
  if (!bindings) return;
  if (typeof bindings === 'string' && !method) console.warn('removeKeybindings requries method as second arg');
  if (typeof bindings === 'string') return removeMethod(bindings, method);
  Object.keys(bindings).forEach((key) => removeMethod(key, bindings[key]));
}
function removeKeybindings (bindings, method) {
  if (!bindings) return;
  if (typeof bindings === 'string' && !method) console.warn('removeKeybindings requries method as second arg');
  if (typeof bindings === 'string') return removeMethod(bindings, method);
  Object.keys(bindings).forEach((key) => removeMethod(key, bindings[key]));
}
function removeKeybindings ( bindings , method ) { if ( ! bindings ) return ; if ( typeof bindings === 'string' && ! method ) console . warn ( 'removeKeybindings requries method as second arg' ) ; if ( typeof bindings === 'string' ) return removeMethod ( bindings , method ) ; Object . keys ( bindings ) . forEach ( ( key ) => removeMethod ( key , bindings [ key ] ) ) ; }
- Function to call to remove keybindings - @arg {String} bindings - the character key to be removed || {Object} bindings - the character to remove, with method as the value {[character]: method} - @arg {Function} method - the callback handler to call when string is passed to bindingsr
- Function to call to remove keybindings -