Skip to content

Full support for loading annyang as a module (UMD support)

Compare
Choose a tag to compare
@TalAter TalAter released this 31 Mar 16:07
· 241 commits to master since this release

[Added] UMD support

annyang can now be required as a module in environments that support them.

Here is an example of using annyang in an Electron app (an environment that supports both modules and Speech Recognition):

<script>
  const annyang = require('./annyang.min.js');
  annyang.addCommands({
    'hello': function() {
      console.log('world');
    }
  });
  annyang.start();
</script>

This additional support for modules does not break existing functionality, as annyang is still available in the global scope.

A huge thanks goes to @v12 for all the hard work to make this feature possible!

[Fixed] Fixed tiny init bug

Bug caused an exception to be thrown when attempting to abort annyang before it was initialized.

[Added] New tests added

Improved test coverage of annyang

Awesome people ⭐

A lot of contributors have helped make this version possible!

Special thanks to:

  • @v12 - Added UMD support.
  • @lmangani - Thank you for repeatedly being the first one to step up and help the community with issues.
  • @wizardsambolton - Thank you for helping the community with issues.
  • @rmilesson - Thank you for helping the community with issues.
  • @evancohen - Thank you for helping the community with issues.
  • @sdkcarlos - Thank you for helping the community with issues.
  • @asantos00 - Thank you for helping the community with issues.
  • @chrifpa - Added tests.
  • @MattCain - Added tests.
  • @Byron - Added tests.
  • @timotius02 - Added tests.
  • @ZahraTee - Added tests.