utils/keybinding.js
function attachKeybindings (binding, method) {
  if (!binding) return console.warn('attachKeybinding requires character or object for binding');
  if (typeof binding === 'string' && !method) console.warn('attachKeybindings requries method as second arg');
  if (hasKeybinding(binding, method)) return console.warn(`attachKeybinding: already attached ${binding} to method`, method);

  if (typeof binding === 'string') addMethod(binding, method);
  else Object.keys(binding).forEach((key) => addMethod(key, binding[key]))
}
function attachKeybindings (binding, method) {
  if (!binding) return console.warn('attachKeybinding requires character or object for binding');
  if (typeof binding === 'string' && !method) console.warn('attachKeybindings requries method as second arg');
  if (hasKeybinding(binding, method)) return console.warn(`attachKeybinding: already attached ${binding} to method`, method);

  if (typeof binding === 'string') addMethod(binding, method);
  else Object.keys(binding).forEach((key) => addMethod(key, binding[key]))
}
function attachKeybindings ( binding , method ) { if ( ! binding ) return console . warn ( 'attachKeybinding requires character or object for binding' ) ; if ( typeof binding === 'string' && ! method ) console . warn ( 'attachKeybindings requries method as second arg' ) ; if ( hasKeybinding ( binding , method ) ) return console . warn ( ` ${ binding } ` , method ) ; if ( typeof binding === 'string' ) addMethod ( binding , method ) ; else Object . keys ( binding ) . forEach ( ( key ) => addMethod ( key , binding [ key ] ) ) }
- Function to call when adding keybindings - @arg {String} bindings - the character key to be bound -   || {Object} bindings - the character to listen for as the key, method as the value {[character]: method} - @arg {Function} method - the callback handler to call when string is passed to bindings
- Function to call when adding keybindings -