0.0.1 • Published 5 years ago

ask-constants v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

ASK Constants contains a number of strings exported as constants to help reduce spelling mistakes in projects built with the amazing Alexa Skills Kit SDK for Node.js.

Disclaimer

This package is in no way affiliated with or endorsed by Amazon or the Alexa team.

Installation

Install ask-constants as a dependency:

$ npm i ask-constants

Usage

My most common use case is combining built-in intents with custom intents.

// constants.ts
import * as constants from "ask-constants";

export const INTENTS = {
  ...constants.intents,

  custom: {
    DO_SOMETHING_COOL: "DoSomethingCool",
  },
};

// intent-handlers.ts
import { INTENTS } from "./constants";

export const IntentHandler = {
  [INTENTS.AMAZON.HELP]: () => response, // some ask handler
};

Feedback

These constants were adapated to my workflow and common use-cases. If you have ideas on how to improve or expand them, please start a discussion via Github issues. Cheers.

0.0.1

5 years ago