mmenu-js
Version:
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.
30 lines (26 loc) • 528 B
text/typescript
const options : mmOptionsSetselected = {
current: true,
hover: false,
parent: false
};
export default options;
/**
* Extend shorthand options.
*
* @param {object} options The options to extend.
* @return {object} The extended options.
*/
export function extendShorthandOptions(
options : mmOptionsSetselected
) : mmOptionsSetselected {
if ( typeof options == 'boolean' ) {
options = {
hover : options,
parent : options
};
}
if ( typeof options != 'object' ) {
options = {};
}
return options;
};