Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 420 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 420 Bytes

hyper-missed-cmd

Utility function to help match a missed command with the hyperterm prompt.

How to use

// Detect with a string
const ohno = require('hyper-missed-cmd')(
  'ohno'
  // alternatively use regex-as-a-string or regex
  // 'ohn[o]+'
  // /ohn[p]+/
);

module.exports.middleware = (store) => (next) => (action) => {
  if(ohno(action)) {
    console.log('ohno was used!');
  }
}

License

MIT