Skip to content

BenMagyar/hyper-missed-cmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Hyper missed command utility function

Resources

License

Stars

Watchers

Forks

Packages

No packages published