hyper-missed-cmd

0.0.4 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i hyper-missed-cmd

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • bmagyar