0.0.4 • Published 6 years ago

hyper-missed-cmd v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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