UNPKG

@joshfarrant/shortcuts-js

Version:
29 lines 870 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _1 = require("./"); /** * Builds a shortcut from an array of actions. * @ignore */ exports.buildShortcut = (actions = [], options) => { const completeOptions = { icon: { color: 4274264319, glyph: 59446, }, showInWidget: true, }; // Map to internal build options if (options) { if (options.icon) { completeOptions.icon = Object.assign(Object.assign({}, completeOptions.icon), options.icon); } if (options.showInWidget === false) { completeOptions.showInWidget = false; } } const template = _1.buildShortcutTemplate(actions, completeOptions); const shortcut = _1.encodeShortcut(template); return shortcut; }; //# sourceMappingURL=buildShortcut.js.map